> Hi, I need to call a funciton in a C++ Dll that requires 2 LPCWSTR
> parameters. How do I marshall this in my DLLIMPORT statement in C# (string
> trpe)? Thank you.?
C# has no DLLIMPORT statements; I assume you mean external declarations
decorated with the DllImport attribute.
Decorate the arguments to pass with [MarshalAs(UnmanagedType.LPWStr)]. See
also http://msdn2.microsoft.com/en-us/library/s9ts558h.aspx.

Signature
J.
Pucca - 02 Mar 2008 01:59 GMT
That worked. Thank you.

Signature
Thanks.
> > Hi, I need to call a funciton in a C++ Dll that requires 2 LPCWSTR
> > parameters. How do I marshall this in my DLLIMPORT statement in C# (string
[quoted text clipped - 5 lines]
> Decorate the arguments to pass with [MarshalAs(UnmanagedType.LPWStr)]. See
> also http://msdn2.microsoft.com/en-us/library/s9ts558h.aspx.