How does a WSH pass a Variant array to a script 
Author Message
 How does a WSH pass a Variant array to a script

I have been building a C++, WSH type DLL to access the VBScript engine.  One
problem I am stuck on is how to pass a Variant array to a Script function.
From VB, I have used the ScriptControl and been able to use:

Private vActions
Private vArg()

            ReDim vArgs(3)
            vArgs(0) = xxx
            vArgs(1) = yyy
            .....
            vActions = SC.Run("Evaluate", vArgs)

To load an array with input parameters, and pass then to a script, that
looks like:

            Sub Evaluate(vArgs)
                    item1 = vArgs(0)
                    ...
            End Sub

I can't figure out how to do the same in MSVC++.  I can use the
::AddNamedItem and GetItemInfo pairs to handle objects in a script.  I can't
figure out how to pass the variant array.  The VBScript engine doesn't
appear to use the GetItemInfo to find out about the vArgs array.

Does anyone have any ideas.

Jan Wiewiora



Sat, 28 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. converting Array to Variant and Variant to Array

2. Passing variant containing byte array

3. Trying to pass a Variant Array of Doubles to ActiveX from HTML

4. Passing a variant array from asp to a cls and back

5. Problem passing a variant array out of VBasic object to ASP

6. Passing an Array of Variants to an ActiveX control

7. Passing variant array from VBScript to ATL

8. Pass Variant Array to a COM Object

9. Passing Variant Array to JScript function

10. convert jscript array to variant array

11. convert JScript Array to Array Variant

12. ?Passing arrays from Server script to Client Script

 

 
Powered by phpBB® Forum Software