Regards[color=blue]
>-----Original Message-----
>How do you copy a String type into a native char buffer[/color]
[256]? Dumb[color=blue]
>question, but not sure how to do it :(
>
>TGF
>
>
>
>.
>[/color]
TGF,[color=blue]
> How do you copy a String type into a native char buffer[256]? Dumb
> question, but not sure how to do it :([/color]
If you don't mind an extra buffer copy, you can use the Marshal class in the
System::Runtime ::InteropServic es namespace, with the StringToAnsiHGl obal(),
then just use strncpy or another like method.
Otherwise, another option would be to use PtrToStringChar s() in vcclr.h, pin
the returned pointer, and then use a Unicode-to-ansi conversion function
(such as WideCharToMulti Byte) directly unto your array.
Comment