
Passing Array from JScript to COM Server
The problem is that a JScript array isn't a VB Safe Array. It's a JScript
Object. Strangely, though MS has provided a means to use Safe Arrays in
JScript (the VBArray object), they haven't provided a way to convert a
JScript array to a Safe Array similar to the JScript Date object's
getVarDate method.
Fortunately, someone has felt your pain. Peter Torr has written an ActiveX
component to convert JScript arrays to Safe Arrays.
http://www.netspace.net.au/~torrboy/code/jsafearr/
--
Too many people spend money they haven't earned, to buy things they don't
want, to impress people they don't like. -Will Rogers
=-=-=
Steve
-=-=-
Quote:
> We want to pass a VarArray from JScript to A Delphi COM Exe Server.
> We made it in this way:
> (Script)
> var ParmTyp = new Array(0,1,2,0,0,0,0);
> var Error = PhyObject.Run_Script(ScriptFileName, Times, LogFile, ParmTyp);
> In server we receive IDispatch variable and want to cast to varArray or
any
> other array, how can we made this.
> We succeed to cast to concatenate string but not to array.
> Thanks, Igal.
> P.D. From VB Script we have not any problem, what's the difference?