How to convert unmanaged string with char array type to managed string with char array type?

  • Thread starter Thread starter joye
  • Start date Start date
J

joye

Hello,

How to convert an unmanaged string with char array type to a managed string
with char array type?
Thanks.

Regards,
Tsung-Yu
 
have a look at the System::Runtime::InteropServices::Marshal class

the func PtrToStringAuto() might do what you want

you have to issue a

#using <mscorlib.dll>

in the managed C++ file

Regards, Eckart
 
Back
Top