Hi,
I was hoping someone could help me return a dynamic array from a C++ Dll to VB.
Here's a simple example.
Basically I want to return an array that holds more than 1 value back to VB.
Is there a better way to do this?
Perhaps using a void function and somehow passing in the pointer by ref?
Any help will be much appreciated.
Thanks.
I was hoping someone could help me return a dynamic array from a C++ Dll to VB.
Here's a simple example.
Code:
double * TestFunction(int count)
{
double* temp = new double[count];
for (int i = 0; i < count; i++){
temp[i] = i;
}
return temp;
}
Basically I want to return an array that holds more than 1 value back to VB.
Is there a better way to do this?
Perhaps using a void function and somehow passing in the pointer by ref?
Any help will be much appreciated.
Thanks.
Comment