Damjan Jovanovic : sti: Allow CoCreateInstance aggregation and fix a broken test.
Alexandre Julliard
julliard at winehq.org
Wed Oct 7 09:46:04 CDT 2009
Module: wine
Branch: master
Commit: 0dea7326c333078e02b99d618002f1d21e0244b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0dea7326c333078e02b99d618002f1d21e0244b8
Author: Damjan Jovanovic <damjan.jov at gmail.com>
Date: Tue Oct 6 19:15:40 2009 +0200
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 15c946d..4e91698 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 9a1aeee..0575d29 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);
}
More information about the wine-cvs
mailing list