marshalling - Convert array<Byte>^ data to const byte* data - C++/CLR -
C ++
So basically C # -> C ++ -> C
C # is trying to call a function from C = C In, I have byte [] bytes - which read information from the file. I am passing the byte array and size to C ++.
I get a byte array and size in C ++, but I can not convert to specific data types.
Zero Image :: OpenMemiFile (array & lt; byte & gt; ^ data, unsigned full size) {free (); M_dataStream = Data; Byte Coast * Stream Data = & amp; Data [0]; // This is where this error throws // Should I use Marshall here? What needs to be said? HImage = :: OpenManimage (streamdata, size;); Modified = false; } // this function I & amp; Nbsp; , Which requires the EXIVSIMPLE_API HIMAGE OpenMemImage (const & amp; nbsp; byte * data, unsigned full size) call {// code imgWrap- & gt; Image = Exiv2 :: ImageFactory :: open (data, size); }
C is required to call function
Image :: AutoPtr ImageFactory :: open (const byte * data, long size) {// / Code}
I need help changing the byte array to convert byte *. I know I need to use Marshall <+>
thanks
pin_ptr & lt; Unsigned four & gt; Pin_buffer = & amp; Data [0]; Unsigned char * pData = pin_buffer;