Author: gadamopoulos
Date: Sun Mar 12 09:48:25 2017
New Revision: 74151

URL: http://svn.reactos.org/svn/reactos?rev=74151&view=rev
Log:
[BROWSEUI] -CExplorerBand: Stub QueryService method and set the site of the 
context menu so as to let the context menu find the SID_IShellBrowser when the 
open menu item is clicked. CORE-11783

Modified:
    trunk/reactos/dll/win32/browseui/explorerband.cpp

Modified: trunk/reactos/dll/win32/browseui/explorerband.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/explorerband.cpp?rev=74151&r1=74150&r2=74151&view=diff
==============================================================================
--- trunk/reactos/dll/win32/browseui/explorerband.cpp   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/explorerband.cpp   [iso-8859-1] Sun Mar 12 
09:48:25 2017
@@ -455,6 +455,9 @@
         ERR("Can't get IContextMenu interface\n");
         goto Cleanup;
     }
+
+    IUnknown_SetSite(contextMenu, (IDeskBand *)this);
+
     treeMenu = CreatePopupMenu();
     hr = contextMenu->QueryContextMenu(treeMenu, 0, FCIDM_SHVIEWFIRST, 
FCIDM_SHVIEWLAST,
         CMF_EXPLORE);
@@ -468,7 +471,10 @@
         x, y, 0, m_hWnd, NULL);
 
     ExecuteCommand(contextMenu, uCommand);
+
 Cleanup:
+    if (contextMenu)
+        IUnknown_SetSite(contextMenu, NULL);
     if (treeMenu)
         DestroyMenu(treeMenu);
     bNavigating = TRUE;
@@ -1192,8 +1198,8 @@
 // *** IServiceProvider methods ***
 HRESULT STDMETHODCALLTYPE CExplorerBand::QueryService(REFGUID guidService, 
REFIID riid, void **ppvObject)
 {
-    UNIMPLEMENTED;
-    return E_NOTIMPL;
+    /* FIXME: we probably want to handle more services here */
+    return IUnknown_QueryService(pSite, SID_SShellBrowser, riid, ppvObject);
 }
 
 


Reply via email to