Marshaling string[] from C# to C++ COM

S

Sergey

Hi,

need just a simple example of marshaling C# string[] to C++ COM object

C#:

void GetMyArray( String[] myArray);



C++:

SAFEARRAY *p;
IObject->GetMyArray(&p)


Thank you for any ideas :)

Sergey
 
J

Jeff Louie

Sergey.... If all else fails you could return a COM SafeArray of
VARIANTS of
type VT_BSTR and see what the type library importer does in C#.

Regards,
Jeff
need just a simple example of marshaling C# string[] to C++ COM object<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top