Passing a Safearray in an event 
Author Message
 Passing a Safearray in an event

I am trying to pass a safearray in my Fire_ event without much success.
What is the correct way to convert the array to a variant so that I can call
IDispatch->Invoke()??

Thanks



Fri, 30 Apr 2004 21:59:36 GMT  
 Passing a Safearray in an event
Assuming psa is an array of BSTRs,

SAFEARRAY *psa;
VARIANT var;

V_VT(&var) = VT_BSTR | VT_ARRAY;
V_ARRAY(&var) = psa;

--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat, and
wrong." H.L. Mencken


Quote:
> I am trying to pass a safearray in my Fire_ event without much success.
> What is the correct way to convert the array to a variant so that I can
call
> IDispatch->Invoke()??

> Thanks



Sat, 01 May 2004 00:58:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem firing an event from ATL to VB which passes a SAFEARRAY

2. IDL for passing SAFEARRAY (BSTR)

3. Help: Passing structure including SafeArrays to C++ DLL

4. SAFEARRAY passed from VBS

5. VB to VC parameter passing Safearray of UDT's

6. Problem passing SAFEARRAYs

7. IDL for passing SAFEARRAY(BSTR)

8. variant of safearray passed as [in, out] parameter

9. SAFEARRAY as event argument

10. URGENT : Passing SAFEARRAY of UDT from ATL DLL to VB

11. Problem with VB clients accessing SAFEARRAY passed from my ATL server

12. Passing a 2D SafeArray from VB client to ATL COM component

 

 
Powered by phpBB® Forum Software