Hi,
I want to return an array of structures from a C# dll to native C++ client
application. The structure looks like this:
public struct mystruct
{
public string strName;
public string strDesign;
public bool bValid;
public bool bLocal;
public DateTime tMyTime;
public TimeSpan tRetention;
}
What's the best way to marshall the array of structure like this from C# dll
to C++ client app? A sample code will be highly appreciated.
Thanks,
Varun
Mattias Sjögren - 21 Jun 2006 21:53 GMT
>I want to return an array of structures from a C# dll to native C++ client
>application. The structure looks like this:
[quoted text clipped - 11 lines]
>What's the best way to marshall the array of structure like this from C# dll
>to C++ client app? A sample code will be highly appreciated.
Well first of all I suggest you replace the .NET specific types such
as DateTime and TimeSpan with a data format that is well defined and
can be used on the native side.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.