Kenneth,

Yes, there is a way to do this, but you need to hack the Interop Assembly (IL).
Take a look at following KB article Q305990 for details:

Willy.


----- Original Message -----
From: "Kenneth Kasajian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 27, 2002 4:43 PM
Subject: [DOTNET] How to call C++ COM object from C#


> I have the following method in a COM object that I currently call from
> another unmanaged C++ client.  Two of its parameters are as follows:
>
>     // Number of entries
>     [in] long Count,
>
>     // Array of IDs
>     [in, size_is(Count)] LONG * pList,
>
> When I import the associated TLB into C#, the size_is parameter is gone.
> Is there a way to call this function from C# or do I have to wrap it?
>
>
> I also have another method where the parameters are like this:
>     // Number of entries
>     [out] short *pCount,
>
>     // Array of IDs
>     [out, size_is( , *pCount ) ] LONG **ppList,
>
> Can this be called from C#?
>
> If so, how?
>
> You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to