Andrew Eikum wrote:
Jacek Caban wrote:
Jacek Caban wrote:
argc = params->cArgs - params->cNamedArgs;
width = argc >= 2 ? params->rgvarg+argc-1 : ∅
height = argc >= 1 ? params->rgvarg+argc-2 : ∅
I've made an obvious mistake here, but I guess it's easy to fix :)


Thanks for the help, Jacek.

If I'm understanding you right, rgvarg points to the named parameters first, followed by the unnamed parameters in reverse order?

In this case:
<named params> <height> <width>

If so, then this should work, yes?
argc = params->cArgs - params->cNamedArgs;
width = argc >= 1 ? params->rgvarg + (params->cArgs - 1) : &empty;
height = argc >= 2 ? params->rgvarg + (params->cArgs - 2) : &empty;


Yes, all is right. There are an examples in dlls/jscript/jscript.h arg_cnt() and get_arg() that deal with DISPPARAMS.


Jacek



Reply via email to