On Wed, Nov 06, 2002 at 01:53:40PM -0500, Dimitrie O. Paun wrote:
On November 6, 2002 01:40 pm, Marcus Meissner wrote:
- FIXME("(%p, %ld, %d, %d, %d, %p, %p, %p)\n",
pvInstance, oVft, cc, vtReturn, cActuals, prgvt, prgpvarg, pvargResult + );
Why is this one a FIXME, and not a TRACE?
Because the function most likely will crash and the user will see that this function is the problem and we get debug output.
[snip]
- /* FIXME: Must handle pvargResult. How? */
Isn't it better to issue a FIXME here, if pvargResult is not NULL?
I do not think it is supposed to be NULL at all, judging from examples, but probably yes. I made it a printed message, and more explicit.
Ciao, Marcus
Index: dlls/oleaut32/typelib.c =================================================================== RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v retrieving revision 1.77 diff -u -u -r1.77 typelib.c --- dlls/oleaut32/typelib.c 31 Jul 2002 17:20:01 -0000 1.77 +++ dlls/oleaut32/typelib.c 6 Nov 2002 19:05:47 -0000 @@ -4192,6 +4192,52 @@
extern int const _argsize(DWORD vt);
+HRESULT WINAPI +DispCallFunc( + void* pvInstance, ULONG oVft, CALLCONV cc, VARTYPE vtReturn, UINT cActuals, + VARTYPE* prgvt, VARIANTARG** prgpvarg, VARIANT* pvargResult +) { + int i, argsize, argspos; + DWORD *args; + HRESULT hres; + + FIXME("(%p, %ld, %d, %d, %d, %p, %p, %p)\n", + pvInstance, oVft, cc, vtReturn, cActuals, prgvt, prgpvarg, pvargResult + ); + argsize = 0; + for (i=0;i<cActuals;i++) { + FIXME("arg %d: type %d\n",i,prgvt[i]); + dump_Variant(prgpvarg[i]); + argsize += _argsize(prgvt[i]); + } + args = (DWORD*)HeapAlloc(GetProcessHeap(),0,sizeof(DWORD)*argsize); + argspos = 0; + for (i=0;i<cActuals;i++) { + int arglen; + VARIANT *arg = prgpvarg[i]; + + arglen = _argsize(prgvt[i]); + if (V_VT(arg) == prgvt[i]) { + memcpy(&args[argspos],&V_UNION(arg,lVal), arglen*sizeof(DWORD)); + } else { + if (prgvt[i] == VT_VARIANT) { + memcpy(&args[argspos],arg, arglen*sizeof(DWORD)); + } else { + ERR("Set arg %d to disparg type %d vs %d\n",i, + V_VT(arg),prgvt[i] + ); + } + } + argspos += arglen; + } + + FIXME("Do not know how to handle pvargResult %p. Expect crash ...\n",pvargResult); + + hres = _invoke((*(DWORD***)pvInstance)[oVft/4],cc,argsize/4,args); + HeapFree(GetProcessHeap(),0,args); + return hres; +} + static HRESULT WINAPI ITypeInfo_fnInvoke( ITypeInfo2 *iface, VOID *pIUnk, Index: dlls/oleaut32/oleaut32.spec =================================================================== RCS file: /home/wine/wine/dlls/oleaut32/oleaut32.spec,v retrieving revision 1.42 diff -u -u -r1.42 oleaut32.spec --- dlls/oleaut32/oleaut32.spec 8 Jul 2002 19:36:24 -0000 1.42 +++ dlls/oleaut32/oleaut32.spec 6 Nov 2002 19:05:47 -0000 @@ -142,7 +142,7 @@ 142 stdcall VarAnd(ptr ptr ptr) VarAnd 143 stub VarDiv # stdcall (ptr ptr ptr) 144 stub OACreateTypeLib2 -146 stub DispCallFunc +146 stdcall DispCallFunc(ptr long long long long ptr ptr ptr) DispCallFunc 147 stdcall VariantChangeTypeEx(ptr ptr long long long) VariantChangeTypeEx 148 stdcall SafeArrayPtrOfIndex(ptr ptr ptr) SafeArrayPtrOfIndex 149 stdcall SysStringByteLen(ptr) SysStringByteLen