all groups > dotnet interop > october 2003
Filter by week: 1 2 3 4 5
Array
Posted by XingZheng at 10/31/2003 11:43:40 AM
Hi
I use pInvoke to call Dll.
How to delete buffer which is allocated in visual c++.
In Visual C ++
public void GetArray(BYTE* &buffer, UINT* length)
{
buffer = new BYTE[10]; //How to delete buffer in C#
......
}
In C#
public void GetArray(out IntPtr lpBuf, out int length);
... more >>
Application crashes ignoring try{...}catch{...}
Posted by Alexey Kouzmitch at 10/31/2003 10:00:09 AM
Hi,
I wrote a console application which is called from a SQL Server job. The
application utilizes a COM object, to pump data from a legacy (not very old
however) application to SQL server. The application works fine, but once in
a while it fails with the following message written to the event ... more >>
How to automate outlook without office ?
Posted by François_Vallernaud at 10/31/2003 9:04:22 AM
I see that it is possible to automate outlook with the
automation object for office msoutl.olb
Unfortunatly Office isn't installed on my computer.
Is it possible to automate outlook using an other way ?
thanks for your help... more >>
Mapping IDL Interface
Posted by Shawn at 10/31/2003 8:34:33 AM
From the Platform SDK, for MMC. Please help mapping the
interface IToolbar for use with C#. I'm specifically
having problems with the AddButtons method, that accepts a
c-style array of MMCBUTTON structure.
IToolbar (from Platform SDK):
[
object,
uuid(43136EB9-D36C-11CF-... more >>
Exclude from Marshal
Posted by Jonny Nilsson at 10/31/2003 8:09:43 AM
Hi
I have a struct with 4 variables in it. How do I do if I dont want all these
variable to be Marshal. Like exsample below.
/Jonny
public class Test
{
public int nType; // To be marskal
public int nSize; // To be mar... more >>
Accessing C# Components from Borland C++ Builder
Posted by Curtis at 10/31/2003 7:46:47 AM
I am investigating the possibility of porting an
application originally developed in Borland C++ Builder 3
to C#.NET. As a proof of concept I need to develop
components in C# and access them from Borland. At least
one of these components is required to access the Serial
port.
So far... more >>
strange error not cought by try...catch...
Posted by Alexey Kouzmitch at 10/30/2003 5:01:20 PM
Hi,
I wrote a console application which is called from a SQL Server job. The
application utilizes a COM object, to pump data from a legacy (no very old
however) application to SQL server. The application works fine, but once in
a while it fails with the following message written to the event l... more >>
Problem in Passing structure to SendMessage API
Posted by anand.dani NO[at]SPAM T-Mobile.com at 10/30/2003 3:16:45 PM
Hi,
I am trying to pass structure in LParam of SendMessage API. I could
not able to get the value in called window.The code and declaration is
as below:
//Class A
//********
[DllImport("User32.Dll" , CharSet=CharSet.Auto)]
private static extern long SendMessage(
IntPtr hWnd, // h... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
2003 Excel Interop Interface Change
Posted by Roman at 10/30/2003 6:39:58 AM
It seems that some of the Office 2003 interfaces changed
(Excel's theWorkbooks.Open in particular). I am using this
call in my Windows Forms application. Do I have to add
references to two Excel assemblies (2003 and prior) and
have to seperate 'Open' calls in the 'If' statement
(depending ... more >>
HttpContext.Current always returns NULL when called from Classic ASP
Posted by mattk NO[at]SPAM mattk.dj at 10/30/2003 5:14:28 AM
Hello,
I am porting my existing ASP business logic into C#, compiling as an
application, then using COM callable wrappers to instantiate the
application under ASP.
I am trying to use HttpContext.Current.Request.MapPath in my c# code,
but when I call the code from ASP HttpContext.Current ret... more >>
Do threads behave Differently on Windows 98?
Posted by Codemonkey at 10/29/2003 4:46:41 PM
Hi,
Sorry for the cross group post, but I couldn't find a group that deals with
threading in .net.
Anyway, I've noticed a difference in the way my program acts on Windows 98
than it does on WindowsXP and was wondering if anybody can explain this
behaviour.
My application runs in the back... more >>
Trouble passing interface as VT_DISPATCH
Posted by Greg Freeman at 10/29/2003 2:52:43 PM
I'm trying to pass a callback object from .NET to COM.
I implement the callback functions in class MyCallback
The COM object needs a Variant VT_DISPATCH type passed to identify the
callback object.
C++ code:
MyCallback * cb = new MyCallback(layer);
Object * dispatch=new
System::Runtime::Int... more >>
Call user defined word vba function from C#
Posted by AP at 10/29/2003 2:43:01 PM
Hi,
If I have created a word template that has a VBA function that I defined in
it, is there anyway I can call this function from C#?
Adam
... more >>
Marshaling Unsigned Types
Posted by Barry Simon at 10/29/2003 11:56:33 AM
Is there a way to marshal unsigned arrays between managed and unmanged code?
Marshal.Copy does not seem to support this and I am unable to find anything
else that does.
- Thanks in advance
... more >>
Accessing .NET class instance from Word
Posted by AP at 10/29/2003 10:20:19 AM
Hi,
My .NET application has a dll with a singleton class in it. In this
singleton class I create and launch a word document. In this word document I
would like to add a close event handler that will call back into the .NET
singleton class. Is this possible? How would I get a handle on this
si... more >>
MSXML interop possible?
Posted by Rick Walters at 10/29/2003 9:54:43 AM
Hello all,
I'm trying to get a legacy ASP application to connect to the functionality
I've created in a .NET component. The ASP app needs to pass an MSXML
DOMDocument to one of the methods of the component, which should then
manipulate it and pass it back.
My first assumption (possibly inco... more >>
Problems deleting from the GAC
Posted by mattk NO[at]SPAM mattk.dj at 10/29/2003 7:02:44 AM
I have a number of different versions of the same assembly in the GAC
that I cannot seem to remove. I got them in there by using:
gacutil /i emailAuth.dll.
I have tried to following methods to remove them:
1. gacutil /u emailAuth
2. gacutil /uf emailAuth - both generate the following mess... more >>
NullPointerException when calling C function in aspnet application
Posted by Christopher Sin at 10/29/2003 5:28:04 AM
Hi, I repost my message here, because I have had posted it
on a wrong group.
Hi,
First, Please ignore my poor English speaking.
I have to write a c# wrapper to a C library.
This is OK, but I have difficulties with some functions
that deals with double indirections.
The C function is
... more >>
ACCESS_ALLOWED_ACE how to convert SidStart to SID
Posted by Charlie Grosvenor at 10/28/2003 10:58:53 PM
Hi
I am really stuck on this problem, I am trying to find out the users
that have permissions to access a file, I have got as far as using the
GetSecurityDescriptorDacl to populate a ACCESS_ALLOWED_ACE structure. What I
need to do is to first find out the sid for the account listed in the
A... more >>
Interop with Word
Posted by dax NO[at]SPAM hotmail.com at 10/28/2003 10:39:49 AM
Hi,
I'm using word in my C# windows application. I added an event handler to
handle DocumentBeforeClose event. Inside the event handler, I set the
second parameter Cancel to true. According to documentation, if Cancel is
true, the document will not be closed. But the document closes anyw... more >>
Searching for a Twain API
Posted by Dehaibe_françois at 10/28/2003 8:03:52 AM
Hello,
I would like to know if someone have informations about a=20
FREE Twain API.
I would like to make a program which have to control =20
cannon scanner.
Best Regards,
Fran=E7ois Dehaibe... more >>
How To: Port HRESULT GetCurrentSample( [out,retval] IMediaSample ** ppSample );
Posted by Assaf at 10/27/2003 8:33:39 PM
hey all.
i am trying to port this IDL method:
HRESULT GetCurrentSample( [out,retval] IMediaSample ** ppSample );
i have already tried all of these method signatures:
[PreserveSig]
int GetCurrentSample( IMediaSample ppSample );
int GetCurrentSample( [Out]IMediaSample ppSample );
int GetCur... more >>
Possible to call DsEnumerateDomainTrusts from VB.NET?
Posted by Luke Morehead at 10/27/2003 5:03:13 PM
I'm trying to use DsEnumerateDomainTrusts to generate a
list of trusted domains in VB.NET. The code I've listed
below generates the error, "An unhandled exception of
type 'System.NullReferenceException' occurred in
NetDisco.exe. Additional information: Object reference
not set to an inst... more >>
Intellisence Autocomplete - Bug?
Posted by Robert M. at 10/27/2003 12:56:08 PM
I'm referencing some third-party COM dlls through IDE Add Reference in
VS .NET 2003. For all generated interop assemblies intellisence
autocomplete works OK, except for one. For the offending one I can
declare types and instantiate objects wo problems but I can't get
intellisence autocomplete ... more >>
COM Interop HELP!
Posted by Levi Wilson at 10/27/2003 11:53:24 AM
I have successfully created a C# DLL and exposed it to C++. What I want to
do now is to add an interface2 to my C# DLL. The C# code compiles
successfully, however when I compile my C++ code (after using Regasm and
everything as well) it fails saying that my method isn't a member of
interface2.... more >>
How do I register a dll for com when distributing?
Posted by Randy at 10/27/2003 10:52:10 AM
Hello,
I am trying to deploy a com-callable wrapper (C# dll with com
interface...) On my development box where I compile with the register
for com setting = true everything works great, but I can't get it to
work when I install from the setup package.
Any ideas?
Thanks
Randy... more >>
FilePropertyDialog
Posted by Robert Hahn at 10/26/2003 8:44:37 PM
Hi, could someone help me with this code ??
It should show the Win32 FileProperty Dialog.
Thanks ! ! !
Robert
Public Structure SHELLEXECUTEINFO
Public cbSize As Long
Public fMask As Long
Public hwnd As Long
Public lpVerb As String
Public lpFile As String
Public lpParameters... more >>
register for com interop - in the ide - deployment doesn't work-what is different
Posted by Randy at 10/26/2003 6:58:31 PM
Hello,
I have created a dll in C# that is to be consumed by Access XP (Access
10). So I guess this means it is a com-callable wrapper. Everything
works great on my development machine. I have the compiler set to
Register for Com interop = true and am publishing my interfaces for COM
an... more >>
VB.NET dll on old ASP?
Posted by Fredrik Melin at 10/25/2003 1:51:46 AM
Hi,
Ive used strong naming and got my VB.NET dll to work on a IIS5 server in ASP
But, I cannot run Shared functions or access any Shared classes from that
DLL.
Does anyone know if it possible to do it?
Regards
Fredrik Melin
... more >>
Runtime error using AxSHDocVw
Posted by Bill Szerdy at 10/24/2003 2:28:06 PM
I am using the AxInterop.SHDocVw.dll in a VB.Net app to
serve up and print HTML documents. Everytime I execute the
code listed below I get the following error:
Runtime Error!
R6025
-pure virtual function call
Here is the code:
dir = New DirectoryInfo(HN_Scripts.ScriptDirectory)
... more >>
Marshaling structs (Pointer to pointer)
Posted by Jonny Nilsson at 10/24/2003 1:39:55 PM
Hi
Can anyone tell me how I marshling function below (SetMyData). It's a
pointer to a pointer.
Thx Jonny
//
// This how the structure look like in header file,
//
typedef struct
{
DWORD nType;
DWORD nSize;
} MyRECORD, *PMyRECORD;
//
// A funtion in a DLL to be ca... more >>
Marshaling structs
Posted by Lars Roith at 10/24/2003 9:38:49 AM
Hello everbody,
I want to marshal structs but I always recieve following error
"Can not marshal field ValueF of type STRUCT_B: This type can not be
marshaled as a structure field."
I have the following two structs:
typedef struct STRUCT_A
{
int ValueA;
char ValueB[64];
int Value... more >>
mscorlib (0x80070002) error in asp when calling a C# web service proxy class
Posted by Rob Shorney at 10/24/2003 6:04:20 AM
Hi,
I have written a c# web service and generated the required
proxy class, via the wsdl.exe tool.
I have compiled this class and Registered it for COM
interop.
I can call the proxy class from a VB6 program, and it
works fine.
However when I try and create it in a asp page I get th... more >>
Dll FolderName
Posted by Cristi at 10/23/2003 11:45:24 PM
Hi All,
I have an application running in folder A.
This application is using a dll (C#) located in folder B.
I want a sollution that inside the dll to be able to find
(know) the path of the dll (C:\...path...\B).
Inside the dll to find out his own location.
Something simmilar with
Sys... more >>
a C++ struct containing a variable size array
Posted by Assaf at 10/23/2003 10:11:42 PM
hi all.
i have a C++ struct that contains a variable size array
how can i interop with the such a struct:
struct DATA
{
// a bunch of simple fields
// ...
char buff[1];
};
assafwo01 at hotmail dot com
... more >>
Default StringBuilder Capacity and Callbacks
Posted by Ed Power at 10/23/2003 2:02:47 PM
I'm using C# and providing a callback function to an unmanaged C++
function that uses the callback to send back a character string. It
works find if the string sent through the callback is less than
StringBuilder's default capacity (16 char). If it is greater, then C#
stops and issues a "cap... more >>
Marshalling with ADO and interop ? Please help !
Posted by Andre Azevedo at 10/23/2003 12:31:44 PM
Hi all,
I've created a Com+ component using c# and Ado (not ado.net).
The component has a method that simply receive an Ado Command, execute it
and returns an Ado recordset:
public ADODB.RecordSet ExecuteCommand(ADODB.CommandClass)
{
object ic;
int opt = (int) ADODB.ExecuteOptionEnum.ad... more >>
A generic error occurred in GDI+
Posted by Ben NO[at]SPAM Heptec.com at 10/23/2003 11:58:30 AM
I have a table in sql that contains the .gif file names for a catalog.
I am writing a report to see if the images are the right expected
size. The problem that I am having is that when I select 3 or more
rows of data in sql I get the error below, but when I select 1 or two
rows the every thing w... more >>
axWebBrowser in Windows Form
Posted by Mike at 10/23/2003 11:54:29 AM
Hi,
I'm trying to host a web browser inside a Windows Forms application
using mshtml (axWebBrowser). However, I need to have the web control ask my
application for the html to display instead of trying to find it itself.
For example, my main html page just describes frames in the page, ... more >>
Does COM need to be registered in the Windows Registry?
Posted by . at 10/23/2003 10:22:09 AM
Hello,
I'm studying for the 70-320 exam.
This is from a book "COM components used by .NET applications must be
registered in the Windows Registry"
Is that still true? Somehow, I think maybe in framework 1.1 Microsoft made
some changes that allows using COM in .NET without having to regist... more >>
Map com types to C# types?
Posted by Alexander Fagerström at 10/23/2003 9:39:52 AM
Hi!
Have great problems to use access my com component from c#. Tryed to import
with tlbimp with and without /transform:dispret statement. I guess that
tlbimp dont handle my com object correct so the solution is to do a manuell
com mapping. How doIi map my idl to a c# equivalent?
thanks, Alexan... more >>
GetType().GetEvents(); return empty collection Word AddIn with late binding
Posted by wibodevroomen NO[at]SPAM hotmail.com at 10/23/2003 7:07:17 AM
I'm trying to attach event handlers to Word events in my AddIn, when I
use early binding there is no problem.
We want to support multiple Word versions so we want to use late
binding, then the problems start, the Word application object is
telling me there are no events.
After reading a lot... more >>
Com+, STA, MTA and WebBrowser control
Posted by Christoph Wienands at 10/23/2003 12:28:59 AM
Hello everybody,
I run into a pretty stupid design problem with threading. I'm trying to
connect two applications with each other. App A controls app B via COM+
(actually there can be several B apps). B creates a transient subscription
to an interface, which is called from A.
By default, Wi... more >>
How To: make a TLB file?
Posted by Assaf at 10/22/2003 9:47:00 PM
hi all.
sorry, but i don't know where else to ask this question.
but how exactly does one make a TLB file?
i have the IDL files and i am trying to compile them to TLB.
for that i added them into a Win32 project.
i defined it as a 'LIB'.
i compiled it, and it gave out a bunch of
*_p.c
*_i... more >>
How To: Import an IDL file to Managed Code?
Posted by assafwo NO[at]SPAM hotmail.com at 10/22/2003 5:17:17 PM
hi all.
i have an IDL file.
i would like to have the Interfaces in it,
available in my Managed Code.
how can i do this?
thanks
assaf
... more >>
Calling CertCreateCertificateContext from C#
Posted by lherget NO[at]SPAM juno.com at 10/22/2003 4:43:43 PM
I'm trying to use CryptoAPI to read in a certificate (.pfx) and put it
into a store. I can open the store just fine, but I am having
problems creating the certificate context. I think that is has to do
with how I am using DllImport. Does anybody have any ideas? Here is
my DllImport statement... more >>
Declaring events in COM built in .NET
Posted by roy at 10/22/2003 4:14:52 PM
Hi everyone.
I built in .NET a 'class library' project , which then I
compiled with "Register for COM interop".
I also added some events.
I use this component in VB6, but I can't hook up to the
events.
Can someone please help?
In the .NET component's code, I tried to define events in
... more >>
TypeLoadException
Posted by :\\\\derian at 10/22/2003 1:19:33 PM
Hello All,
I'm attempting to add a c# DLL that uses unmanaged code to my VB project.
When I add the C# DLL to the project and compile, all goes well but when i
hit F5, i get a System.TypeLoadException (could not load type.... from
assembly...) Any ideas?
... more >>
Using FAXCOMEXLib with HTML files
Posted by Russell Reed at 10/22/2003 10:54:40 AM
I am trying to create a c# component to automate the faxing of documents.
In order for these documents to be created easily I am using html docs, but
when I use the FAXCOMEXLib component to send the fax, I always get the
printer window popup and must click print in order to send the fax. My
mac... more >>
problem with interop a .dll in C++
Posted by ayaz at 10/22/2003 9:47:07 AM
HI all, Im writing an application in C#, Im using some
methods from a
C++ .dll file, ive imported a method but it seems it cant
map the
type, the C++ method
C++//
TCHAR * WINAPI PortReadResult()
{
int numTimes = 0;
while ( m_threadFinishedReading == false ) // see if the
t... more >>
|