Calling from a script to a host method that accepts 'params' array
- From: Ehud <ehudm1@xxxxxxxxx>
- Date: Sun, 21 Dec 2008 06:42:59 -0800 (PST)
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
.
- Prev by Date: Re: Vb6, Com Interop DLL & Memory
- Next by Date: Help needed registering c# assembly for COM Interop
- Previous by thread: RE: Wrong Interop Version of Excel loads
- Next by thread: Help needed registering c# assembly for COM Interop
- Index(es):
Relevant Pages
|