J
Jozsef Bekes
Hi All,
I need to offer scripting possibilities in my app, and have to use
MSSCriptControl for some reasons. I would like to use the feature that's
called variable number of arguments, that is done in C# using the params
keyword. However, if I AddObject the instance to the MSScriptControl, and
try to ivoke a function with variable number of arguments, the script throws
an exception. I have exported the class signatrure to a tlb file, and
checked the signature. The C# function is exported like this:
[id(0x60020007), vararg] HRESULT ParamListTester( [in] BSTR s, [in]
SAFEARRAY(VARIANT) p);
I have checked an existing function in MSScriptControl ocx, and a similar
function having this feature has this signature:
[id(0x000007d3), vararg, helpstring("Call a procedure defined in the
module"), helpcontext(0x00113f09)]
HRESULT Run([in] BSTR ProcedureName, [in] SAFEARRAY(VARIANT)* Parameters,
[out, retval] VARIANT* pvarResult);
The only difference seems to be the * in the parameter definition, but I
cannot see a way to implement it in C#. Can anyone help me with that?
Thank you,
Jozsef
I need to offer scripting possibilities in my app, and have to use
MSSCriptControl for some reasons. I would like to use the feature that's
called variable number of arguments, that is done in C# using the params
keyword. However, if I AddObject the instance to the MSScriptControl, and
try to ivoke a function with variable number of arguments, the script throws
an exception. I have exported the class signatrure to a tlb file, and
checked the signature. The C# function is exported like this:
[id(0x60020007), vararg] HRESULT ParamListTester( [in] BSTR s, [in]
SAFEARRAY(VARIANT) p);
I have checked an existing function in MSScriptControl ocx, and a similar
function having this feature has this signature:
[id(0x000007d3), vararg, helpstring("Call a procedure defined in the
module"), helpcontext(0x00113f09)]
HRESULT Run([in] BSTR ProcedureName, [in] SAFEARRAY(VARIANT)* Parameters,
[out, retval] VARIANT* pvarResult);
The only difference seems to be the * in the parameter definition, but I
cannot see a way to implement it in C#. Can anyone help me with that?
Thank you,
Jozsef