
Passing VB String array to DLL???
I am writting a DLL in VC++ 4.0 for VB 4.0 32. I want to be able to
pass a VB String array to the DLL, where it will modifiy the contents of
the VB string array
I am unsure of how to use the array to be able to modify the contents
of each individual string. Here is what I have so far.
STDAPI_(short) RecVBStrArray(const long vlTuning, SAFEARRAY **lpsa)
{
SAFEARRAY *psa;
BSTR *lptrStringArray;
if (!lpsa) return (-1);
psa = *lpsa;
if(!psa) return (-2);
lptrStringArray = (BSTR *)psa->pvData;
// Causes an error, normally it should just remove the pointer and free
the old string
// |
// |
SysFreeString(*lptrStringArray);
return (0);
Quote:
}
I have tried using OLECHAR * instead of the SAFEARRAY type actual
argument, but I get errors when I try to pass anything to it.
Any help would be greatly apperiecated, please e-mail me answers,
suggestions ect. TIA
--
Andy
UU UU University of Cincinnati
UU UU Electrical Engineering
UU UU Class of 2000
UU UU CCCCCC
UUUUU CC
CC
CC
CCCCCCC
CCCCCC