
Passing array of Strings between VB and VC
I've had no problem doing this using a SAFEARRAY of BSTR's. Why do you use a
VARIANT?
--
Jeremy - my reply address is foiled
Quote:
>I want to pass an array of strings from Visual Basic to an
>ActiveX object in Visual C++. The array is supposed to be
>updated and then passed back to VB. I'm using SafeArray
>and I've tried to manipulate the array using both
>SafeArrayPutElement and SafeArrayAccessData. Everything
>look fine but when the function is done I get an Access
>Violation i VB (during debug). Why? The method is declared
>like this:
>GetFileNames(VARIANT * vFileNamesArray)
>Has anyone got a clue?
>--
>Johan Andersson
>S66/71
>Skandia IT
>103 50 STOCKHOLM
>Tel. 08-788 49 34