I've converted "[] byte" to "byte *" at times, using 'unsafe' and
fixed { .... }, but the reverse does not seem to work.
In this case, a C++ DLL returns a byte * and a length. What is the best
way to convert these to straight C#-compatible straight "[] byte" arrays?
PS: The C++ DLL is actually managed and I have access to the source.
Perhaps there is a simpler syntax for doing the conversion there, and
returning a C# compatible array rather than a pointer?
fixed { .... }, but the reverse does not seem to work.
In this case, a C++ DLL returns a byte * and a length. What is the best
way to convert these to straight C#-compatible straight "[] byte" arrays?
PS: The C++ DLL is actually managed and I have access to the source.
Perhaps there is a simpler syntax for doing the conversion there, and
returning a C# compatible array rather than a pointer?
Comment