R.Wieser
unread,Jan 18, 2021, 3:59:25 AM1/18/21You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello all,
In a typelib (.IDL file) I'm trying to define a method with default values
for some arguments:
HRESULT MyMethod([in] variant* Arg1, [in, defaultvalue(-1)] long Arg2, [in]
long Arg3, [in] variant* Arg4, [in, defaultvalue(-1)] long Arg5, [in]
variant* Arg6, [out, retval] variant* TheResult);
From VBScript I'm trying to call the method without specifying those
"defaultvalue" arguments
TheResult = MyMethod(Arg1,,Arg3,Arg4,,Arg6)
Alas, I'm getting an error saying that the (Arg2 and Arg5) arguments are not
optional.
My question: How come ? Those "defaultvalue" arguments locations are,
AFAICS, known and fixed. What do I need to also specify to make the above
work ?
Remark: using a one or more "defaultvalue" arguments at the end of a method
(before the "retval" one) works fine.
Regards,
Rudy Wieser