Hi all,
I would be very gratefull if you could help me in solving the following problem.
I've developed a C library which exports a function which use as input parameter an array of strings. I have to invoke this function from VB. With the help of google I've discovered the SAFEARRAY. I am able to pass the parameters from VB to C but I have no idea on how to access to the SAFEARRAY type.
For instance, let us suppose to have the following C function:
long __declspec (dllexport) __stdcall TryArrayString(SAFEARRAY **ppsaMyArray)
{
...
return 0;
}
Let us suppose that I have the following code in VB:
Dim s(4) As String
s(0) = "Pippo"
s(1) = "Pluto"
s(2) = "Paperino"
s(3) = "Minnie"
Dim tmp As Long
tmp = ProvaArrayString(VarPtrStringArray(s()))
My question is: what I have to put at place of "..." in function TryArrayString for accessing the array of strings that is contained into ppsaMyArray?
Many thanks in advance for your help and best regards,
Cristina
I would be very gratefull if you could help me in solving the following problem.
I've developed a C library which exports a function which use as input parameter an array of strings. I have to invoke this function from VB. With the help of google I've discovered the SAFEARRAY. I am able to pass the parameters from VB to C but I have no idea on how to access to the SAFEARRAY type.
For instance, let us suppose to have the following C function:
long __declspec (dllexport) __stdcall TryArrayString(SAFEARRAY **ppsaMyArray)
{
...
return 0;
}
Let us suppose that I have the following code in VB:
Dim s(4) As String
s(0) = "Pippo"
s(1) = "Pluto"
s(2) = "Paperino"
s(3) = "Minnie"
Dim tmp As Long
tmp = ProvaArrayString(VarPtrStringArray(s()))
My question is: what I have to put at place of "..." in function TryArrayString for accessing the array of strings that is contained into ppsaMyArray?
Many thanks in advance for your help and best regards,
Cristina