[PATCH] ole32: IMoniker_IsRunning returns E_INVALIDARG when bindctx is NULL.

Reece Dunn msclrhd at googlemail.com
Mon Mar 1 17:18:14 CST 2010


Hi,

This fixes a few of the todo blocks in the ole32:moniker tests.

- Reece
-------------- next part --------------
From 0c4ab9a1b0ad2e541d972a2301b0b3afb753ced6 Mon Sep 17 00:00:00 2001
From: Reece Dunn <msclrhd at gmail.com>
Date: Mon, 1 Mar 2010 23:15:11 +0000
Subject: [PATCH] ole32: IMoniker_IsRunning returns E_INVALIDARG when bindctx is NULL.

---
 dlls/ole32/compositemoniker.c |    2 +-
 dlls/ole32/itemmoniker.c      |    2 +-
 dlls/ole32/tests/moniker.c    |    3 ---
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c
index 5535a97..7402b8e 100644
--- a/dlls/ole32/compositemoniker.c
+++ b/dlls/ole32/compositemoniker.c
@@ -670,7 +670,7 @@ CompositeMonikerImpl_IsRunning(IMoniker* iface, IBindCtx* pbc,
         else{
 
             if (pbc==NULL)
-                return E_POINTER;
+                return E_INVALIDARG;
 
             /* If pmkToLeft and pmkNewlyRunning are both NULL, this method checks the ROT to see whether */
             /* the moniker is running. If so, the method returns S_OK; otherwise, it recursively calls   */
diff --git a/dlls/ole32/itemmoniker.c b/dlls/ole32/itemmoniker.c
index f83eb23..ff8f9b4 100644
--- a/dlls/ole32/itemmoniker.c
+++ b/dlls/ole32/itemmoniker.c
@@ -561,7 +561,7 @@ static HRESULT WINAPI ItemMonikerImpl_IsRunning(IMoniker* iface,
             return S_OK;
         else {
             if (pbc==NULL)
-                return E_POINTER;
+                return E_INVALIDARG;
 
             res=IBindCtx_GetRunningObjectTable(pbc,&rot);
 
diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c
index 7cc5f78..b4e3e2f 100644
--- a/dlls/ole32/tests/moniker.c
+++ b/dlls/ole32/tests/moniker.c
@@ -1495,7 +1495,6 @@ static void test_item_moniker(void)
 
     /* IsRunning test */
     hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL);
-    todo_wine
     ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr);
 
     hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
@@ -1631,7 +1630,6 @@ static void test_generic_composite_moniker(void)
 
     /* IsRunning test */
     hr = IMoniker_IsRunning(moniker, NULL, NULL, NULL);
-    todo_wine
     ok(hr == E_INVALIDARG, "IMoniker_IsRunning should return E_INVALIDARG, not 0x%08x\n", hr);
 
     hr = IMoniker_IsRunning(moniker, bindctx, NULL, NULL);
@@ -1645,7 +1643,6 @@ static void test_generic_composite_moniker(void)
     todo_wine
     ok(hr == E_INVALIDARG, "IMoniker_BindToObject should return E_INVALIDARG, not 0x%08x\n", hr);
 
-    todo_wine
     hr = IMoniker_BindToStorage(moniker, bindctx, NULL, &IID_IUnknown, (void **)&unknown);
     ok(hr == E_INVALIDARG, "IMoniker_BindToStorage should return E_INVALIDARG, not 0x%08x\n", hr);
 
-- 
1.6.3.3


More information about the wine-patches mailing list