oleaut32: Handle coclasses in ITypeInfo_Invoke().
Based on a patch by Sebastian Lackner. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39799 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ab6d4a9d3d
commit
94f4b49d78
|
@ -2591,7 +2591,7 @@ static void test_typelibmarshal(void)
|
||||||
dispparams.rgvarg = vararg;
|
dispparams.rgvarg = vararg;
|
||||||
VariantInit(&varresult);
|
VariantInit(&varresult);
|
||||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
hr = IDispatch_Invoke(pDispatch, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
||||||
todo_wine ok_ole_success(hr, IDispatch_Invoke);
|
ok_ole_success(hr, IDispatch_Invoke);
|
||||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||||
excepinfo.wCode, excepinfo.scode);
|
excepinfo.wCode, excepinfo.scode);
|
||||||
|
|
|
@ -6572,6 +6572,7 @@ static HRESULT get_iface_guid(ITypeInfo *tinfo, HREFTYPE href, GUID *guid)
|
||||||
ITypeInfo *tinfo2;
|
ITypeInfo *tinfo2;
|
||||||
TYPEATTR *tattr;
|
TYPEATTR *tattr;
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
|
int flags, i;
|
||||||
|
|
||||||
hres = ITypeInfo_GetRefTypeInfo(tinfo, href, &tinfo2);
|
hres = ITypeInfo_GetRefTypeInfo(tinfo, href, &tinfo2);
|
||||||
if(FAILED(hres))
|
if(FAILED(hres))
|
||||||
|
@ -6593,6 +6594,22 @@ static HRESULT get_iface_guid(ITypeInfo *tinfo, HREFTYPE href, GUID *guid)
|
||||||
*guid = tattr->guid;
|
*guid = tattr->guid;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TKIND_COCLASS:
|
||||||
|
for (i = 0; i < tattr->cImplTypes; i++)
|
||||||
|
{
|
||||||
|
ITypeInfo_GetImplTypeFlags(tinfo2, i, &flags);
|
||||||
|
if (flags & IMPLTYPEFLAG_FDEFAULT)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i == tattr->cImplTypes)
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
hres = ITypeInfo_GetRefTypeOfImplType(tinfo2, i, &href);
|
||||||
|
if (SUCCEEDED(hres))
|
||||||
|
hres = get_iface_guid(tinfo2, href, guid);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERR("Unexpected typekind %d\n", tattr->typekind);
|
ERR("Unexpected typekind %d\n", tattr->typekind);
|
||||||
hres = E_UNEXPECTED;
|
hres = E_UNEXPECTED;
|
||||||
|
|
Loading…
Reference in New Issue