Calling from a script to a host method that accepts 'params' array

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I would like to call from jscript on HTML page that is displayed
within a WebBrowser control to a method in the host that accepts any
number of arguments through 'params' array. It worked fine as long as
I tried to call a method with a final number or arguments (where I
didn't use the 'params' array).

For example:
My script looks like the following:
window.external.MyHostMethod(str1, str2, str3, ...)

The C# method should look something like:
void MyHostMethod([MarshalAs(UnmanagedType.SafeArray,
SafeArraySubType=VarEnum.VT_VARIANT)] params object[] objs)

But it doesn't work. I get a message of "Invalid procedure call or
argument".

Is it possible (calling from a script to a host method that accepts
'params' array)? How?


TIA,
Ehud
.



Relevant Pages

  • Re: ipc::run
    ... I have written a script that uses ipc::run on an array, like this, ... foreach my $host { ... Shlomi Fish http://www.shlomifish.org/ ...
    (perl.beginners)
  • Re: script input being an array of variables ... is this possible ?
    ... > will be on the host PC. ... > and then use string functions to seperate the values and iterate through ... Just post them to the script as an array, ...
    (alt.php)
  • Re: Script Required to Check a range of IPs
    ... I think your script is fine except for this line. ... you want to use push ... to add the ip to your array. ... print "$host is "; ...
    (perl.beginners)
  • Re: script input being an array of variables ... is this possible ?
    ... How can I see how many items there are in the array? ... >> will be on the host PC. ... >> and then use string functions to seperate the values and iterate through ... > Just post them to the script as an array, ...
    (alt.php)
  • Re: IBM FastT vs. EMC Clarion
    ... AIX hosts have to be shutdown when doing the firmware upgrade ... any AIX servers attached to that unit will have to be shutdown. ... interrupting host I/O access to the array. ... interrupting host I/O access to the array thousands of times with many ...
    (AIX-L)