J
joshuapking
I'm having a very difficult time coming across an appropriate solution
for this seemingly simple problem. I've written a managed wrapper
class for some legacy C++ routines. One routine generates an array of
ints, which I wish to expose through the managed wrapper. The managed
C++ wrapper is being used as an intermediary to allow VB.NET to access
the legacy C routines (and the return array, in particular).
Given these constraints, can someone please instruct the best course of
action? I can't figure out how to define/update the C array to be .NET
compatible. Do I need to use the Marshal class? Do I need to declare
an "array<int, 1>" and use a handle (^). Any help, particularly
specific syntax examples, would be tremendous.
void returnArray(int* pArray, int& pSize); //Legacy C function
Thanks, Josh
for this seemingly simple problem. I've written a managed wrapper
class for some legacy C++ routines. One routine generates an array of
ints, which I wish to expose through the managed wrapper. The managed
C++ wrapper is being used as an intermediary to allow VB.NET to access
the legacy C routines (and the return array, in particular).
Given these constraints, can someone please instruct the best course of
action? I can't figure out how to define/update the C array to be .NET
compatible. Do I need to use the Marshal class? Do I need to declare
an "array<int, 1>" and use a handle (^). Any help, particularly
specific syntax examples, would be tremendous.
void returnArray(int* pArray, int& pSize); //Legacy C function
Thanks, Josh