oleaut32: Return type mismatch errors in ITypeLibComp_fnBind.
This commit is contained in:
parent
4f20455e4c
commit
da409d6a7b
|
@ -150,7 +150,7 @@ static void test_TypeComp(void)
|
||||||
/* test getting a function within a TKIND_MODULE with INVOKE_PROPERTYGET */
|
/* test getting a function within a TKIND_MODULE with INVOKE_PROPERTYGET */
|
||||||
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture);
|
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszSavePicture);
|
||||||
hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr);
|
hr = ITypeComp_Bind(pTypeComp, wszSavePicture, ulHash, INVOKE_PROPERTYGET, &pTypeInfo, &desckind, &bindptr);
|
||||||
todo_wine ok(hr == TYPE_E_TYPEMISMATCH,
|
ok(hr == TYPE_E_TYPEMISMATCH,
|
||||||
"ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n",
|
"ITypeComp_Bind should have failed with TYPE_E_TYPEMISMATCH instead of 0x%08x\n",
|
||||||
hr);
|
hr);
|
||||||
|
|
||||||
|
|
|
@ -4722,6 +4722,7 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
|
||||||
{
|
{
|
||||||
ITypeLibImpl *This = impl_from_ITypeComp(iface);
|
ITypeLibImpl *This = impl_from_ITypeComp(iface);
|
||||||
ITypeInfoImpl *pTypeInfo;
|
ITypeInfoImpl *pTypeInfo;
|
||||||
|
int typemismatch=0;
|
||||||
|
|
||||||
TRACE("(%s, 0x%x, 0x%x, %p, %p, %p)\n", debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr);
|
TRACE("(%s, 0x%x, 0x%x, %p, %p, %p)\n", debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr);
|
||||||
|
|
||||||
|
@ -4761,6 +4762,8 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
|
||||||
TRACE("found in module or in enum: %s\n", debugstr_w(szName));
|
TRACE("found in module or in enum: %s\n", debugstr_w(szName));
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
else if (hr == TYPE_E_TYPEMISMATCH)
|
||||||
|
typemismatch = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pTypeInfo->TypeAttr.typekind == TKIND_COCLASS) &&
|
if ((pTypeInfo->TypeAttr.typekind == TKIND_COCLASS) &&
|
||||||
|
@ -4833,11 +4836,21 @@ static HRESULT WINAPI ITypeLibComp_fnBind(
|
||||||
ITypeInfo_AddRef(*ppTInfo);
|
ITypeInfo_AddRef(*ppTInfo);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
else if (hr == TYPE_E_TYPEMISMATCH)
|
||||||
|
typemismatch = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("name not found %s\n", debugstr_w(szName));
|
if (typemismatch)
|
||||||
return S_OK;
|
{
|
||||||
|
TRACE("type mismatch %s\n", debugstr_w(szName));
|
||||||
|
return TYPE_E_TYPEMISMATCH;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TRACE("name not found %s\n", debugstr_w(szName));
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI ITypeLibComp_fnBindType(
|
static HRESULT WINAPI ITypeLibComp_fnBindType(
|
||||||
|
|
Loading…
Reference in New Issue