Reece Dunn : ole32: IMoniker_IsRunning returns E_INVALIDARG when bindctx is NULL.

Alexandre Julliard julliard at winehq.org
Tue Mar 2 10:32:33 CST 2010


Module: wine
Branch: master
Commit: 0ed4c6df24a040c32ada6f49c91f81b226670e5c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0ed4c6df24a040c32ada6f49c91f81b226670e5c

Author: Reece Dunn <msclrhd at gmail.com>
Date:   Mon Mar  1 23:15:11 2010 +0000

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);
 




More information about the wine-cvs mailing list