https://bugs.winehq.org/show_bug.cgi?id=35390
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |NEW
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
with commit http://source.winehq.org/git/wine.git/commitdiff/a8a753b49a65fd3938cf1582066... ("wbemdisp: Specify default value for method arguments.") it now goes a bit further but still fails during invocation.
--- snip --- ... 0026:trace:ole:ITypeInfo_fnInvoke invoking: L"ConnectServer"(9) parm0: L"strServer" parm1: L"strNamespace" parm2: L"strUser" parm3: L"strPassword" parm4: L"strLocale" parm5: L"strAuthority" parm6: L"iSecurityFlags" parm7: L"objWbemNamedValueSet" parm8: L"objWbemServices" memid is 00000001 Param 0: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b4b8 Param 1: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b4d0 Param 2: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b4e8 Param 3: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b500 Param 4: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b518 Param 5: tdesc.vartype 8 (VT_BSTR) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b530 Param 6: tdesc.vartype 3 (VT_I4) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b548 Param 7: tdesc.vartype 9 (VT_DISPATCH) u.paramdesc.wParamFlags PARAMFLAG_FIN PARAMFLAG_FOPT PARAMFLAG_FHASDEFAULT u.paramdesc.lpex 0x15b560 Param 8: tdesc.vartype 26 (ptr to ptr to VT_USERDEFINED ref = 7d0) u.paramdesc.wParamFlags PARAMFLAG_FOUT PARAMFLAG_FRETVAL u.paramdesc.lpex (nil) funckind: 1 (pure virtual) invkind: 1 (func) callconv: 4 (stdcall) oVft: 28 cParamsOpt: 0 wFlags: 0 elemdescFunc (return value type): tdesc.vartype 25 (VT_HRESULT) u.paramdesc.wParamFlags PARAMFLAGS_NONE u.paramdesc.lpex (nil) helpstring: (null) entry: invalid 0026:Call ntdll.RtlAllocateHeap(00110000,00000008,00000156) ret=7ecbd21f 0026:Ret ntdll.RtlAllocateHeap() retval=0015ec68 ret=7ecbd21f 0026:trace:ole:ITypeInfo_fnAddRef (0x15b700)->ref is 1 0026:trace:ole:ITypeLib2_fnAddRef (0x145e98) ref=2 0026:trace:ole:ITypeInfo_fnGetRefTypeInfo (0x15b2e0) hreftype 0x07d0 loaded SUCCESS (0x15b700) 0026:trace:ole:ITypeInfo_fnGetTypeAttr (0x15b700) 0026:Call ntdll.RtlAllocateHeap(00110000,00000000,0000004c) ret=7ecbd2b4 0026:Ret ntdll.RtlAllocateHeap() retval=0015edc8 ret=7ecbd2b4 0026:trace:ole:ITypeInfo_fnReleaseTypeAttr (0x15b700)->(0x15edc8) 0026:Call ntdll.RtlFreeHeap(00110000,00000000,0015edc8) ret=7ecbd375 0026:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7ecbd375 0026:trace:ole:ITypeInfo_fnRelease (0x15b700)->(0) 0026:trace:ole:ITypeLib2_fnRelease (0x145e98) ref=1 0026:trace:ole:ITypeInfo_fnInvoke changing args 0026:trace:ole:dump_Variant 0x681db8->{VT_BSTR,(null)} 0026:trace:ole:dump_Variant 0x681da8->{VT_BSTR,L"root\CIMV2"} 0026:trace:ole:dump_Variant 0x681d98->{VT_BSTR,(null)} 0026:trace:ole:dump_Variant 0x681d88->{VT_BSTR,(null)} 0026:trace:variant:VariantCopy (0x15eca8->(VT_EMPTY),0x15b520->(VT_BSTR)) 0026:trace:variant:VariantClear (0x15eca8->(VT_EMPTY)) 0026:Call ntdll.RtlAllocateHeap(00110000,00000000,00000010) ret=7ec9a0db 0026:Ret ntdll.RtlAllocateHeap() retval=0015edc8 ret=7ec9a0db 0026:trace:variant:VariantCopy (0x15ecb8->(VT_EMPTY),0x15b538->(VT_BSTR)) 0026:trace:variant:VariantClear (0x15ecb8->(VT_EMPTY)) 0026:Call ntdll.RtlAllocateHeap(00110000,00000000,00000010) ret=7ec9a0db 0026:Ret ntdll.RtlAllocateHeap() retval=0015ede0 ret=7ec9a0db 0026:trace:variant:VariantCopy (0x15ecc8->(VT_EMPTY),0x15b550->(VT_I4)) 0026:trace:variant:VariantClear (0x15ecc8->(VT_EMPTY)) 0026:trace:variant:VariantCopy (0x15ecd8->(VT_EMPTY),0x15b568->(VT_PTR)) 0026:Call ntdll.RtlFreeHeap(00110000,00000000,0015ec68) ret=7ecbd375 0026:Ret ntdll.RtlFreeHeap() retval=00000001 ret=7ecbd375 0026:trace:ole:ITypeInfo_fnInvoke -- 0x80020008 0026:trace:ole:ITypeInfo_fnRelease (0x15b2e0)->(4294967295) 0026:Call KERNEL32.FormatMessageW(00003200,00000000,80020008,00000000,0033f6f8,00000100,00000000) ret=00410e20 0026:Ret KERNEL32.FormatMessageW() retval=00000000 ret=00410e20 0026:Call KERNEL32.RaiseException(0eedfade,00000001,00000007,0033f8e4) ret=0049efd3 0026:trace:seh:raise_exception code=eedfade flags=1 addr=0x7b83ab23 ip=7b83ab23 tid=0026 0026:trace:seh:raise_exception info[0]=0049efd3 0026:trace:seh:raise_exception info[1]=0065e530 0026:trace:seh:raise_exception info[2]=80020008 0026:trace:seh:raise_exception info[3]=00000000 0026:trace:seh:raise_exception info[4]=00000000 0026:trace:seh:raise_exception info[5]=0033f994 0026:trace:seh:raise_exception info[6]=0033f900 0026:trace:seh:raise_exception eax=7b826b89 ebx=7b8bb000 ecx=0033f900 edx=0033f860 esi=0033f8e4 edi=0033f8b0 0026:trace:seh:raise_exception ebp=0033f888 esp=0033f824 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00200283 --- snip ---
--- snip --- [in, defaultvalue(0)] IDispatch *objWbemNamedValueSet, --- snip ---
--- snip --- Wine-dbg> l else if (wParamFlags & PARAMFLAG_FOPT) { VARIANTARG *arg; arg = prgpvarg[i] = &rgvarg[i]; if (wParamFlags & PARAMFLAG_FHASDEFAULT) { hres = VariantCopy(arg, &func_desc->lprgelemdescParam[i].u.paramdesc.pparamdescex->varDefaultValue); if (FAILED(hres)) break; } ... Wine-dbg>p *func_desc->lprgelemdescParam[i].u.paramdesc.pparamdescex
{cBytes=0x18, varDefaultValue={n1={n2={vt=0x1a, wReserved1=0, wReserved2=0, wReserved3=0, n3={cVal=0, uiVal=0, ulVal=0, intVal=0, uintVal=0, bVal=0, iVal=0, lVal=0, fltVal=0.000000, dblVal=0.000000, boolVal=0, scode=0, date=0.000000, bstrVal=0x0(nil), cyVal={s={Lo=0, Hi=0}, int64=0}, punkVal=(nil), pdispVal=(nil), parray=(nil), llVal=0, ullVal=0, pcVal=0x0(nil), puiVal=0x0(nil), pulVal=0x0(nil), pintVal=0x0(nil), puintVal=0x0(nil), pbVal=0x0(nil), piVal=0x0(nil), plVal=0x0(nil), pfltVal=0x0(nil), pdblVal=0x0(nil), pboolVal=0x0(nil), pscode=0x0(nil), pdate=0x0(nil), pbstrVal=(nil), pvarVal=(nil), byref=0x0(nil), pcyVal=(nil), pdecVal=(nil), ppunkVal=(nil), ppdispVal=(nil), pparray=(nil), pllVal=0x0(nil), pullVal=0x0(nil), ... --- snip ---
vt=0x1a -> VT_PTR
I tried:
[in, defaultvalue((IDispatch*)NULL)] IDispatch* foo [in, defaultvalue(NULL)] IDispatch* foo [in, defaultvalue((IDispatch*)0) IDispatch* foo
and it still ended up being VT_PTR instead of VARIANT(VT_DISPATCH, 0).
$ wine --version wine-1.7.14-52-g31faed5
Regards