From 0dea7326c333078e02b99d618002f1d21e0244b8 Mon Sep 17 00:00:00 2001 From: Damjan Jovanovic Date: Tue, 6 Oct 2009 19:15:40 +0200 Subject: [PATCH] sti: Allow CoCreateInstance aggregation and fix a broken test. --- dlls/sti/sti_main.c | 3 --- dlls/sti/tests/sti.c | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/sti/sti_main.c b/dlls/sti/sti_main.c index 15c946dcc0a..4e91698c372 100644 --- a/dlls/sti/sti_main.c +++ b/dlls/sti/sti_main.c @@ -97,9 +97,6 @@ static HRESULT WINAPI sti_cf_CreateInstance( IClassFactory *iface, LPUNKNOWN pOu *ppobj = NULL; - if (pOuter) - return CLASS_E_NOAGGREGATION; - r = This->pfnCreateInstance( riid, pOuter, (LPVOID *)&punk ); if (FAILED(r)) return r; diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c index 9a1aeeeb139..0575d29937d 100644 --- a/dlls/sti/tests/sti.c +++ b/dlls/sti/tests/sti.c @@ -218,7 +218,9 @@ static void test_stillimage_aggregation(void) if (SUCCEEDED(hr)) IStillImage_Release(pStiW); hr = CoCreateInstance(&CLSID_Sti, &aggregator, CLSCTX_ALL, &IID_IUnknown, (void**)&pUnknown); - ok(FAILED(hr), "CoCreateInstance unexpectedly succeeded when querying for IUnknown during aggregation\n"); + ok(SUCCEEDED(hr) || + broken(hr == CLASS_E_NOAGGREGATION), /* Win 2000 */ + "CoCreateInstance unexpectedly failed when querying for IUnknown during aggregation, hr = 0x%x\n", hr); if (SUCCEEDED(hr)) IUnknown_Release(pUnknown); }