ole32: Allow the getting of different interfaces from the global interface table than that with what the object was registered with.

This commit is contained in:
Rob Shearman 2007-05-22 10:32:19 +01:00 committed by Alexandre Julliard
parent 05230781b0
commit 7d90b6ce29
2 changed files with 2 additions and 7 deletions

View File

@ -271,15 +271,11 @@ StdGlobalInterfaceTable_GetInterfaceFromGlobal(
entry = StdGlobalInterfaceTable_FindEntry(iface, dwCookie);
if (entry == NULL) {
WARN("Entry for cookie 0x%x not found\n", dwCookie);
LeaveCriticalSection(&git_section);
return E_INVALIDARG;
}
if (!IsEqualIID(&entry->iid, riid)) {
LeaveCriticalSection(&git_section);
WARN("entry->iid (%s) != riid\n", debugstr_guid(&entry->iid));
return E_INVALIDARG;
}
TRACE("entry=%p\n", entry);
hres = IStream_Clone(entry->stream, &stream);

View File

@ -2640,9 +2640,8 @@ static void test_globalinterfacetable(void)
/* test getting interface from global with different iid */
hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, cookie, &IID_IUnknown, (void **)&object);
todo_wine
ok_ole_success(hr, IGlobalInterfaceTable_GetInterfaceFromGlobal);
if (SUCCEEDED(hr)) IUnknown_Release(object);
IUnknown_Release(object);
/* test getting interface from global with same iid */
hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, cookie, &IID_IClassFactory, (void **)&object);