Passing array to COM object 
Author Message
 Passing array to COM object

I have a COM object (3rd party) that takes a SAFEARRAY as an input
parameter.  I know that if the object expected a VARIANT that this would
work, but unfortunately I've got no control over the interface.  Does
VBScript support the creation and passing of an array to that object without
using a variant?  I currently get a runtime error: Type mismatch.

Scott



Mon, 31 May 2004 01:34:31 GMT  
 Passing array to COM object
If the 3rd party COM method does not intend to modify the array, try forcing a pass by value by putting ()s around the array argument.

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> I have a COM object (3rd party) that takes a SAFEARRAY as an input
> parameter.  I know that if the object expected a VARIANT that this would
> work, but unfortunately I've got no control over the interface.  Does
> VBScript support the creation and passing of an array to that object without
> using a variant?  I currently get a runtime error: Type mismatch.

> Scott



Mon, 31 May 2004 01:54:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing arrays between COM objects

2. Passing Arrays to COM Object Slows Performance

3. Passing Array to COM Object

4. automation error - passing array to com object

5. Passing array using COM objects

6. Passing array using COM objects

7. Passing array from COM object to ASP

8. Passing array using COM objects

9. Passing an Array object to a C++ COM object

10. Passing a vjscript byte array to a C++ COM object

11. Pass Variant Array to a COM Object

12. Passing Arrays from VBScript to COM Object

 

 
Powered by phpBB® Forum Software