3.1.4.4.2 Invoke Argument-Parameter Mapping

The two arrays of VARIANTs that appear in this method, pDispParams->rgvarg and rgVarRef, are two halves of the same whole.

The first array, pDispParams->rgvarg, MUST contain only the [in] argument values, whose updates do not need to be reflected on the client side. The second array, rgVarRef, MUST contains all the [in, out] or [out] arguments, passed by reference, which need to update client-side state upon return. The elements in this array MUST be mapped to positional or named arguments through rgVarRefIdx.

In addition, any parameters that have the lcid or retval attributes MUST NOT be packed in the pDispParams->rgvarg or rgVarRef. Instead the "lcid" argument MUST be used to specify the third argument (lcid) to IDispatch::Invoke. Also, the "retval" argument MUST be set from the sixth argument (pVarResult) to IDispatch::Invoke.