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

  • Thread starter Thread starter Sergey
  • Start date Start date
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
 
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<
 
Back
Top