From e4bb3ae755cee67c7631425a4f21d9b3a2e22895 Mon Sep 17 00:00:00 2001 From: Alexandre Goujon Date: Sun, 15 Aug 2010 12:01:28 +0200 Subject: [PATCH] atl: Fix AtlAxAttachControl wine check. --- dlls/atl/atl_ax.c | 3 +++ dlls/atl/tests/atl_ax.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index d9d60a56b9..1293cb830b 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -1053,6 +1053,9 @@ HRESULT WINAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUn *ppUnkContainer = (IUnknown*) pUnkContainer; } + if(!hWnd) + return S_FALSE; + return hr; } diff --git a/dlls/atl/tests/atl_ax.c b/dlls/atl/tests/atl_ax.c index d17046dffe..4555bd6053 100644 --- a/dlls/atl/tests/atl_ax.c +++ b/dlls/atl/tests/atl_ax.c @@ -94,12 +94,10 @@ static void test_AtlAxAttachControl(void) } hr = pAtlAxAttachControl(pObj, NULL, NULL); - todo_wine ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); pContainer = (IUnknown *)0xdeadbeef; hr = pAtlAxAttachControl(pObj, NULL, &pContainer); - todo_wine ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); ok(pContainer != (IUnknown *)0xdeadbeef && pContainer != NULL, -- 2.33.8