[PATCH 3/5] shell32/shellview: Set provided callback in SHCreateShellFolderView()

Nikolay Sivov nsivov at codeweavers.com
Sun Apr 30 14:01:55 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/shell32/shlview.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
index 070f0705cb..2c8b6bd8d5 100644
--- a/dlls/shell32/shlview.c
+++ b/dlls/shell32/shlview.c
@@ -43,6 +43,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#define CINTERFACE
 #define COBJMACROS
 #define NONAMELESSUNION
 
@@ -3775,6 +3776,14 @@ HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *desc, IShellView **shel
     if (!*shellview)
         return E_OUTOFMEMORY;
 
+    if (desc->psfvcb)
+    {
+        IShellFolderView *view;
+        IShellView_QueryInterface(*shellview, &IID_IShellFolderView, (void **)&view);
+        IShellFolderView_SetCallback(view, desc->psfvcb, NULL);
+        IShellFolderView_Release(view);
+    }
+
     return S_OK;
 }
 
-- 
2.11.0




More information about the wine-patches mailing list