Commit c0f120db authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

oleaut32: Search inherited interfaces again in ITypeComp::Bind.

parent 62c37253
...@@ -121,6 +121,7 @@ static void test_TypeComp(void) ...@@ -121,6 +121,7 @@ static void test_TypeComp(void)
static WCHAR wszClone[] = {'C','l','o','n','e',0}; static WCHAR wszClone[] = {'C','l','o','n','e',0};
static WCHAR wszclone[] = {'c','l','o','n','e',0}; static WCHAR wszclone[] = {'c','l','o','n','e',0};
static WCHAR wszJunk[] = {'J','u','n','k',0}; static WCHAR wszJunk[] = {'J','u','n','k',0};
static WCHAR wszAddRef[] = {'A','d','d','R','e','f',0};
hr = LoadTypeLib(wszStdOle2, &pTypeLib); hr = LoadTypeLib(wszStdOle2, &pTypeLib);
ok_ole_success(hr, LoadTypeLib); ok_ole_success(hr, LoadTypeLib);
...@@ -307,6 +308,19 @@ static void test_TypeComp(void) ...@@ -307,6 +308,19 @@ static void test_TypeComp(void)
ok(pTypeInfo == NULL, "pTypeInfo should have been NULL, was: %p\n", pTypeInfo); ok(pTypeInfo == NULL, "pTypeInfo should have been NULL, was: %p\n", pTypeInfo);
ok(bindptr.lptcomp == NULL, "bindptr should have been NULL, was: %p\n", bindptr.lptcomp); ok(bindptr.lptcomp == NULL, "bindptr should have been NULL, was: %p\n", bindptr.lptcomp);
/* tests inherited members */
desckind = 0xdeadbeef;
bindptr.lpfuncdesc = NULL;
pTypeInfo = NULL;
ulHash = LHashValOfNameSys(SYS_WIN32, LOCALE_NEUTRAL, wszAddRef);
hr = ITypeComp_Bind(pTypeComp, wszAddRef, ulHash, 0, &pTypeInfo, &desckind, &bindptr);
ok_ole_success(hr, ITypeComp_Bind);
ok(desckind == DESCKIND_FUNCDESC, "desckind should have been DESCKIND_FUNCDESC, was: %d\n", desckind);
ok(pTypeInfo != NULL, "pTypeInfo should not have been NULL, was: %p\n", pTypeInfo);
ok(bindptr.lpfuncdesc != NULL, "bindptr should not have been NULL, was: %p\n", bindptr.lpfuncdesc);
ITypeInfo_ReleaseFuncDesc(pTypeInfo, bindptr.lpfuncdesc);
ITypeInfo_Release(pTypeInfo);
ITypeComp_Release(pTypeComp); ITypeComp_Release(pTypeComp);
ITypeInfo_Release(pFontTypeInfo); ITypeInfo_Release(pFontTypeInfo);
ITypeLib_Release(pTypeLib); ITypeLib_Release(pTypeLib);
......
...@@ -7846,7 +7846,7 @@ static HRESULT WINAPI ITypeComp_fnBind( ...@@ -7846,7 +7846,7 @@ static HRESULT WINAPI ITypeComp_fnBind(
ITypeInfoImpl *This = info_impl_from_ITypeComp(iface); ITypeInfoImpl *This = info_impl_from_ITypeComp(iface);
const TLBFuncDesc *pFDesc; const TLBFuncDesc *pFDesc;
const TLBVarDesc *pVDesc; const TLBVarDesc *pVDesc;
HRESULT hr = S_OK; HRESULT hr = DISP_E_MEMBERNOTFOUND;
TRACE("(%p)->(%s, %x, 0x%x, %p, %p, %p)\n", This, debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr); TRACE("(%p)->(%s, %x, 0x%x, %p, %p, %p)\n", This, debugstr_w(szName), lHash, wFlags, ppTInfo, pDescKind, pBindPtr);
...@@ -7908,6 +7908,8 @@ static HRESULT WINAPI ITypeComp_fnBind( ...@@ -7908,6 +7908,8 @@ static HRESULT WINAPI ITypeComp_fnBind(
} }
WARN("Could not search inherited interface!\n"); WARN("Could not search inherited interface!\n");
} }
if (hr == DISP_E_MEMBERNOTFOUND)
hr = S_OK;
TRACE("did not find member with name %s, flags 0x%x\n", debugstr_w(szName), wFlags); TRACE("did not find member with name %s, flags 0x%x\n", debugstr_w(szName), wFlags);
return hr; return hr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment