[PATCH 5/5] shell32: Set output interfaces to NULL in FolderItems functions.

Alex Henrie alexhenrie24 at gmail.com
Mon Jul 4 00:25:06 CDT 2016


Cc: Christian Costa <titan.costa at gmail.com>
Cc: Sebastian Lackner <sebastian at fds-team.de>

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
 dlls/shell32/shelldispatch.c       | 9 ++++++++-
 dlls/shell32/tests/shelldispatch.c | 3 ---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index ea0956a..e634c86 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -1069,12 +1069,16 @@ static HRESULT WINAPI FolderItemsImpl_get_Application(FolderItems3 *iface, IDisp
     if (!ppid)
         return E_INVALIDARG;
 
+    *ppid = NULL;
     return E_NOTIMPL;
 }
 
 static HRESULT WINAPI FolderItemsImpl_get_Parent(FolderItems3 *iface, IDispatch **ppid)
 {
-    FIXME("(%p,%p)\n", iface, ppid);
+    TRACE("(%p,%p)\n", iface, ppid);
+
+    if (ppid)
+        *ppid = NULL;
 
     return E_NOTIMPL;
 }
@@ -1086,6 +1090,7 @@ static HRESULT WINAPI FolderItemsImpl_Item(FolderItems3 *iface, VARIANT index, F
     if (!ppid)
         return E_INVALIDARG;
 
+    *ppid = NULL;
     return E_NOTIMPL;
 }
 
@@ -1096,6 +1101,7 @@ static HRESULT WINAPI FolderItemsImpl__NewEnum(FolderItems3 *iface, IUnknown **p
     if (!ppunk)
         return E_INVALIDARG;
 
+    *ppunk = NULL;
     return E_NOTIMPL;
 }
 
@@ -1120,6 +1126,7 @@ static HRESULT WINAPI FolderItemsImpl_get_Verbs(FolderItems3 *iface, FolderItemV
     if (!ppfic)
         return E_INVALIDARG;
 
+    *ppfic = NULL;
     return E_NOTIMPL;
 }
 
diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c
index f0738d4..613da2b 100644
--- a/dlls/shell32/tests/shelldispatch.c
+++ b/dlls/shell32/tests/shelldispatch.c
@@ -369,7 +369,6 @@ todo_wine
     r = FolderItems_Item(items, var, &item);
 todo_wine
     ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r);
-todo_wine
     ok(!item, "item is not null\n");
 
     if (0) /* crashes on xp */
@@ -394,7 +393,6 @@ todo_wine
     disp = (IDispatch*)0xdeadbeef;
     r = FolderItems_get_Parent(items, &disp);
     ok(r == E_NOTIMPL, "expected E_NOTIMPL, got %08x\n", r);
-todo_wine
     ok(!disp, "disp is not null\n");
 
     if (0) /* crashes on xp */
@@ -425,7 +423,6 @@ todo_wine
         r = FolderItems3_get_Verbs(items3, &verbs);
 todo_wine
         ok(r == S_FALSE, "expected S_FALSE, got %08x\n", r);
-todo_wine
         ok(!verbs, "verbs is not null\n");
     }
 
-- 
2.9.0




More information about the wine-patches mailing list