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

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
 
E

Eckart Haug

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top