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:
Nikolay Sivov 2016-03-21 11:55:57 +03:00 committed by Alexandre Julliard
parent 7863247ec6
commit fde61d467a
2 changed files with 1 additions and 2 deletions

View File

@ -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.

View File

@ -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);