c++ cli - Convert native byte...? -
how can convert native byte (unsigned char) type variable managed byte array array^ in c++?
byte sdata[255]; // convert system::byte array or copy content bytearray?? how? array<system::byte>^ bytearray;
thankyou assiastance...
you can way:
char buf[] = "native string"; int len = strlen(buf); array<byte> ^bytearray = gcnew array<byte>(len + 2); marshal::copy( (intptr)buf, bytearray, 0, len );
you can find more info in this msdn article.
Comments
Post a Comment