Hello Again
I would like to know how VARIANTS are push into the stack, because I am having some problems with it.
here is a vc++ example declaration


STDMETHOD(get_accChild)(THIS_ VARIANT varChildIndex, IDispatch * FAR* ppdispChild) PURE;

implementation


...
VARIANT varChild;
IDispatch* pDisp = NULL;
accWin->get_accChild(varChild, &pDisp);


I tried to ported to masm this way


lea eax, pDisp
push eax
lea eax, varChild
push eax
mov edx, accWin
push edx
mov edx, [edx]
call [edx].IAccessible.get_accChild


but it does not work..

Are VARIANTs push into the stack in another way ?
I have push the VARIANT address

Thanks
Posted on 2003-09-28 18:36:14 by Jnrz
Your passing the address of the variant.. the definition doesnt show a pointer. You should push the entire variant structure (in reverse order of course ;) ).

Try this


lea eax, pDisp
push eax
lea eax, varChild
push [eax + 12]
push [eax + 8]
push [eax + 4]
push [eax]
mov edx, accWin
push edx
mov edx, [edx]
call [edx].IAccessible.get_accChild


Regards,
:NaN:
Posted on 2003-09-28 22:43:47 by NaN