[SHLWAPI]

- Implement SHForwardContextMenuMsg according to http://undoc.airesoft.co.uk/shlwapi.dll/SHForwardContextMenuMsg.php
CORE-9446 (Part 1/2)

svn path=/trunk/; revision=66978
This commit is contained in:
Giannis Adamopoulos
2015-03-30 12:16:29 +00:00
parent 413e9379e1
commit 9fecc42e25
3 changed files with 41 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ list(APPEND SOURCE
path.c
reg.c
regstream.c
rosordinal.c
shlwapi_main.c
stopwatch.c
string.c

View File

@@ -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;
}

View File

@@ -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