I have my own C ++ library that uses a large static buffer (it receives data from the device).
Let's say this buffer is defined as follows:
unsigned char LargeBuffer[1000000];
Now I would like to open parts of this buffer for managed C ++, for example. when 1000 bytes of new data is stored in the library in LargeBuffer[5000], I would like to call back to managed C ++ code by passing a pointer to LargeBuffer[5000]so that managed C ++ can access 1000 bytes of data there (directly, if possible, i.e. without copying data, for maximum performance).
What is the best way to allow managed data access to C ++ code in this native array?
source
share