Testing a Variant Output argument in ATL Com object using VB client 
Author Message
 Testing a Variant Output argument in ATL Com object using VB client

With reference to above subject i am not getting variant output while testing in
VB client.  After calling the method of ATL object in VB, the syntax i used is
given below;
Consider the ATL object is o and its function is func.  

The syntax:

Dim a as variant
o.func a     //where a is variant

//In the variant i am passing an array of strings in ATL object i.e.
VT_ARRAY/VT_BSTR.(This is equated in vt of variant a in func of com object)

In the VB client i wanted to know the string array in the variant.  Please let me
know the syntax for testing.

Best regards,

H.Sriram



Sat, 06 Dec 2003 21:30:00 GMT  
 Testing a Variant Output argument in ATL Com object using VB client
Sriram,
I think this should work. assuming you are getting back an array in the
variant.
For i = LBound(a) To UBound(a)
Debug.Print a(i)
Next

This will  display the strings in the immediate window.
Murtuza


With reference to above subject i am not getting variant output while
testing in
VB client.  After calling the method of ATL object in VB, the syntax i used
is
given below;
Consider the ATL object is o and its function is func.

The syntax:

Dim a as variant
o.func a     //where a is variant

//In the variant i am passing an array of strings in ATL object i.e.
VT_ARRAY/VT_BSTR.(This is equated in vt of variant a in func of com object)

In the VB client i wanted to know the string array in the variant.  Please
let me
know the syntax for testing.

Best regards,

H.Sriram



Sat, 06 Dec 2003 23:10:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Convert variant to object (VB-COM used in VC)

2. Problems using a ATL COM EXE Server with VB Client

3. passing objects from VB as VARIANT to COM server object failing

4. passing objects from VB as VARIANT to COM server object failing

5. Problem with scripting context when using VB com object inside VC com object

6. Problem using a VB COM object in ATL project

7. VC++ ATL Server, VB Client, VARIANTs and SAFEARRAYS ??

8. ATL COM object can't get arrays from VB in VB/VC6

9. ATL COM object can't get arrays from VB in VB/VC6

10. MFC client access a VB COM Server with SAFEARRAY argument

11. MFC client access a VB COM Server with SAFEARRAY argument

12. debugging out-of-proc ATL server from VB test client

 

 
Powered by phpBB® Forum Software