Author: janderwald
Date: Mon Nov 26 23:16:54 2007
New Revision: 30785
URL:
http://svn.reactos.org/svn/reactos?rev=30785&view=rev
Log:
- was not meant to commited
Modified:
trunk/reactos/dll/win32/shell32/shv_item_cmenu.c
Modified: trunk/reactos/dll/win32/shell32/shv_item_cmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_item_cmenu.c (original)
+++ trunk/reactos/dll/win32/shell32/shv_item_cmenu.c Mon Nov 26 23:16:54 2007
@@ -1262,3 +1262,62 @@
RegCloseKey(hKey);
return index;
}
+
+/*************************************************************************
+ * SHCreateDefaultContextMenu [SHELL32.325] Vista API
+ *
+ */
+
+HRESULT WINAPI SHCreateDefaultContextMenu(
+ const DEFCONTEXTMENU *pdcm,
+ REFIID riid,
+ void **ppv)
+{
+ HRESULT hr;
+ IContextMenu2 * pcm;
+
+ if (pdcm->cidl > 0)
+ pcm = ISvItemCm_Constructor( pdcm->psf, pdcm->pidlFolder, pdcm->apidl,
pdcm->cidl );
+ else
+ pcm = ISvBgCm_Constructor( pdcm->psf, TRUE );
+
+ hr = S_OK;
+ *ppv = pcm;
+
+ return hr;
+}
+
+/*************************************************************************
+ * CDefFolderMenu_Create2 [SHELL32.701]
+ *
+ */
+
+INT
+WINAPI
+CDefFolderMenu_Create2(
+ LPCITEMIDLIST pidlFolder,
+ HWND hwnd,
+ UINT cidl,
+ LPCITEMIDLIST *apidl,
+ IShellFolder *psf,
+ LPFNDFMCALLBACK lpfn,
+ UINT nKeys,
+ HKEY *ahkeyClsKeys,
+ IContextMenu **ppcm)
+{
+ DEFCONTEXTMENU pdcm;
+ HRESULT hr;
+
+ pdcm.hwnd = hwnd;
+ pdcm.pcmcb = NULL; //FIXME
+ pdcm.pidlFolder = pidlFolder;
+ pdcm.psf = psf;
+ pdcm.cidl = cidl;
+ pdcm.apidl = apidl;
+ pdcm.punkAssociationInfo = NULL;
+ pdcm.cKeys = nKeys;
+ pdcm.aKeys = ahkeyClsKeys;
+
+ hr = SHCreateDefaultContextMenu(&pdcm, &IID_IContextMenu, (void**)ppcm);
+ return hr;
+}