-
help.....
anyone can tell me what's wrong with this code??
i got runtime error when i got into the second line....
DISPPARAMS dispParams;
dispParams.rgvarg[0].vt = VT_I2;
dispParams.rgvarg[0].iVal = 1;
dispParams.cArgs = 1;
dispParams.cNamedArgs = 0;
thanks in advance
adachi
-
Re: help.....
you are referencing memory that has not been allocated:
dispParams.rgvarg[0].vt = VT_I2;
look at the definition of DISPPARAMS and you will see that the rgvarg variable is defined like:
VARIANTARG FAR* rgvarg;
which does not allocate memory;