ole32: Fix CreataDataCache() return value when requested riid is not IUnknown, for aggregation case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7863247ec6
commit
fde61d467a
|
@ -2464,7 +2464,7 @@ HRESULT WINAPI CreateDataCache(
|
|||
* IUnknown pointer can be returned to the outside.
|
||||
*/
|
||||
if ( pUnkOuter && !IsEqualIID(&IID_IUnknown, riid) )
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
return E_INVALIDARG;
|
||||
|
||||
/*
|
||||
* Try to construct a new instance of the class.
|
||||
|
|
|
@ -1598,7 +1598,6 @@ static void test_data_cache(void)
|
|||
|
||||
/* requested is not IUnknown */
|
||||
hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IOleCache2, (void**)&pOleCache);
|
||||
todo_wine
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
|
||||
hr = CreateDataCache(&unknown, &CLSID_NULL, &IID_IUnknown, (void**)&unk);
|
||||
|
|
Loading…
Reference in New Issue