From fde61d467abd7c8357c25d17b39b2a5e8e9b871c Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 21 Mar 2016 11:55:57 +0300 Subject: [PATCH] ole32: Fix CreataDataCache() return value when requested riid is not IUnknown, for aggregation case. Signed-off-by: Nikolay Sivov Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/ole32/datacache.c | 2 +- dlls/ole32/tests/ole2.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index e93e867e86e..21f63d32ada 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -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. diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index d58105c6a8e..afff6baa5a6 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -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);