Author: gadamopoulos
Date: Mon Mar 30 12:16:29 2015
New Revision: 66978
URL:
http://svn.reactos.org/svn/reactos?rev=66978&view=rev
Log:
[SHLWAPI]
- Implement SHForwardContextMenuMsg according to
http://undoc.airesoft.co.uk/shlwapi.dll/SHForwardContextMenuMsg.php
CORE-9446 (Part 1/2)
Added:
trunk/reactos/dll/win32/shlwapi/rosordinal.c (with props)
Modified:
trunk/reactos/dll/win32/shlwapi/CMakeLists.txt
trunk/reactos/dll/win32/shlwapi/shlwapi.spec
Modified: trunk/reactos/dll/win32/shlwapi/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/CMakeLists.txt [iso-8859-1] Mon Mar 30 12:16:29 2015
@@ -17,6 +17,7 @@
path.c
reg.c
regstream.c
+ rosordinal.c
shlwapi_main.c
stopwatch.c
string.c
Added: trunk/reactos/dll/win32/shlwapi/rosordinal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/rosordin…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/rosordinal.c (added)
+++ trunk/reactos/dll/win32/shlwapi/rosordinal.c [iso-8859-1] Mon Mar 30 12:16:29 2015
@@ -0,0 +1,39 @@
+/*
+ * PROJECT: ReactOS Shell
+ * LICENSE: GPL - See COPYING in the top level directory
+ * PURPOSE: Misc shell helper functions
+ * COPYRIGHT: Copyright 2015 Giannis Adamopoulos
+ */
+
+#include "precomp.h"
+
+/*
http://undoc.airesoft.co.uk/shlwapi.dll/SHForwardContextMenuMsg.php */
+HRESULT WINAPI SHForwardContextMenuMsg(IUnknown* pUnk, UINT uMsg, WPARAM wParam,
+ LPARAM lParam, LRESULT* pResult, BOOL
useIContextMenu2)
+{
+ HRESULT hr;
+ IContextMenu3* pcmenu3;
+ IContextMenu2* pcmenu2;
+
+ /* First try to use the IContextMenu3 interface */
+ hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu3, (void**)&pcmenu3);
+ if (SUCCEEDED(hr))
+ {
+ hr = IContextMenu3_HandleMenuMsg2(pcmenu3, uMsg, wParam, lParam, pResult);
+ IContextMenu3_Release(pcmenu3);
+ return hr;
+ }
+
+ /* Return failure if we can't use the IContextMenu2 interface */
+ if(!useIContextMenu2)
+ return hr;
+
+ /* Now try to use the IContextMenu2 interface */
+ hr = IUnknown_QueryInterface(pUnk, &IID_IContextMenu2, (void**)&pcmenu2);
+ if (FAILED(hr))
+ return hr;
+
+ hr = IContextMenu2_HandleMenuMsg(pcmenu2, uMsg, wParam, lParam);
+ IContextMenu2_Release(pcmenu2);
+ return hr;
+}
Propchange: trunk/reactos/dll/win32/shlwapi/rosordinal.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/shlwapi/shlwapi.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/shlwapi.…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/shlwapi.spec [iso-8859-1] Mon Mar 30 12:16:29 2015
@@ -542,7 +542,7 @@
542 stdcall -noname GetUIVersion()
543 stdcall -noname CreateColorSpaceWrapW(ptr) gdi32.CreateColorSpaceW
544 stub -noname QuerySourceCreateFromKey
-545 stub -noname SHForwardContextMenuMsg
+545 stdcall -noname SHForwardContextMenuMsg(ptr long long long ptr long)
546 stub -noname IUnknown_DoContextMenuPopup
547 stdcall DelayLoadFailureHook(str str) kernel32.DelayLoadFailureHook
548 stub -noname SHAreIconsEqual