wakthar
February 27th, 2002, 05:00 AM
Hi,
I've created a simple Managed Class library Porject using Visual C++.NET.
I want to be able to have a function in Class1 which has the ability to take
in a pointer to a safearray and a pointer to an int, loop through the array
and add 10 to each value, and work out the sum of the array and put it into
the pointer to an int.
The signature is something like this
int CalculateArray(SAFEARRAY* psaData, int* lSum);
If I now create another VB.NET project, add a reference to this class then
the function doesn't appear !
If then remove the pointer (*) and leave it as
int CalculateArray(SAFEARRAY psaData, int lSum);
the function appears !!
Can I not pass pointers to functions in a managed project ??
If I cant then is there a workaround ??
I've created a simple Managed Class library Porject using Visual C++.NET.
I want to be able to have a function in Class1 which has the ability to take
in a pointer to a safearray and a pointer to an int, loop through the array
and add 10 to each value, and work out the sum of the array and put it into
the pointer to an int.
The signature is something like this
int CalculateArray(SAFEARRAY* psaData, int* lSum);
If I now create another VB.NET project, add a reference to this class then
the function doesn't appear !
If then remove the pointer (*) and leave it as
int CalculateArray(SAFEARRAY psaData, int lSum);
the function appears !!
Can I not pass pointers to functions in a managed project ??
If I cant then is there a workaround ??