As my earlier post would suggest, I am using some C++ unmanaged DLLs in
a C# program. A number of the functions used in the C++ DLL have
CString as a parameter. I cannot seem to figure out the correct way to
expose the CString objects to the C# DLL call. I was able to get
parameters passed using char* and LPCTSTR.
I know I could convert all of the CStrings to LPCTSTR but it would be
best if I did not have to make many changes to the existing C++ code. I
am trying to keep all of the conversions as close to the DLL interface
or C# as possible.
msnews.microsoft.com - 16 Jun 2006 07:22 GMT
There is not support for this in the current implementation. You could
write a custom marshaler that handles this case.
Marcus
> As my earlier post would suggest, I am using some C++ unmanaged DLLs in
> a C# program. A number of the functions used in the C++ DLL have
[quoted text clipped - 6 lines]
> am trying to keep all of the conversions as close to the DLL interface
> or C# as possible.
TDC - 16 Jun 2006 13:46 GMT
Are you trying to pass a CString to a C++ function, or get one back as
a return value?
> As my earlier post would suggest, I am using some C++ unmanaged DLLs in
> a C# program. A number of the functions used in the C++ DLL have
[quoted text clipped - 6 lines]
> am trying to keep all of the conversions as close to the DLL interface
> or C# as possible.