Am I doing it right?
I get a pointer to my own array and should copy to a managed array. Use memcpy () with pin_ptr.
unsigned char* pArray; unsigned int arrayCount;
arrayCount is the actual length of the pArray, so it doesn't really care about this aspect. I looked at the code and the array is copied from the vector. Therefore, I can safely set the size of the managed array.
c ++ native memcpy c ++ - cli
Soppus
source share