Author: janderwald
Date: Mon Nov 12 00:38:44 2007
New Revision: 30366
URL:
http://svn.reactos.org/svn/reactos?rev=30366&view=rev
Log:
- make INewItem_Constructor compatible to be loaded as a shell extension
- fix api definition of CDefFolderMenu_Create2
- disable loading of inewitem api (reenabled when default context menu api implementation
is ready)
Modified:
trunk/reactos/dll/win32/shell32/shell32_main.h
trunk/reactos/dll/win32/shell32/shellole.c
trunk/reactos/dll/win32/shell32/shv_bg_cmenu.c
trunk/reactos/dll/win32/shell32/shv_item_cmenu.c
trunk/reactos/dll/win32/shell32/shv_item_new.c
Modified: trunk/reactos/dll/win32/shell32/shell32_main.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32_…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shell32_main.h (original)
+++ trunk/reactos/dll/win32/shell32/shell32_main.h Mon Nov 12 00:38:44 2007
@@ -82,7 +82,7 @@
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl,
LPCITEMIDLIST *aPidls, UINT uItemCount);
-HRESULT WINAPI INewItem_Constructor(LPSHELLFOLDER pSFParent, REFIID riid, LPVOID *ppv);
+HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv);
IContextMenu2 * ISvStaticItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl,
LPCITEMIDLIST *apidl, UINT cidl, HKEY hKey);
IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER);
Modified: trunk/reactos/dll/win32/shell32/shellole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellole…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellole.c (original)
+++ trunk/reactos/dll/win32/shell32/shellole.c Mon Nov 12 00:38:44 2007
@@ -78,6 +78,7 @@
{&CLSID_Printers, &ISF_Printers_Constructor},
{&CLSID_RecycleBin, &RecycleBin_Constructor},
{&CLSID_OpenWith, &SHEOW_Constructor},
+ {&CLSID_NewMenu, &INewItem_Constructor},
{NULL,NULL}
};
Modified: trunk/reactos/dll/win32/shell32/shv_bg_cmenu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_bg_c…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_bg_cmenu.c (original)
+++ trunk/reactos/dll/win32/shell32/shv_bg_cmenu.c Mon Nov 12 00:38:44 2007
@@ -226,7 +226,7 @@
* FIXME
* load other shell extensions
*/
-
+#if 0
if (SUCCEEDED(INewItem_Constructor(This->pSFParent, &IID_IContextMenu2,
(LPVOID*)&icm)))
{
if (SUCCEEDED(IContextMenu_QueryContextMenu(icm, hMenu, 10, idCmdFirst,
idCmdLast, uFlags)))
@@ -239,6 +239,7 @@
This->icm_new = NULL;
}
}
+#endif
if (This->bDesktop)
{
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 12 00:38:44 2007
@@ -1291,7 +1291,9 @@
*
*/
-INT CDefFolderMenu_Create2(
+INT
+WINAPI
+CDefFolderMenu_Create2(
LPCITEMIDLIST pidlFolder,
HWND hwnd,
UINT cidl,
Modified: trunk/reactos/dll/win32/shell32/shv_item_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_item_new.c (original)
+++ trunk/reactos/dll/win32/shell32/shv_item_new.c Mon Nov 12 00:38:44 2007
@@ -55,7 +55,7 @@
PSHELLNEW_ITEM s_SnHead;
}INewMenuImpl;
-static const GUID CLSID_NewMenu = {0xD969A300, 0xE7FF, 0x11d0, {0xA9, 0x3B, 0x00, 0xA0,
0xC9, 0x0F, 0x27, 0x19} };
+const GUID CLSID_NewMenu = {0xD969A300, 0xE7FF, 0x11d0, {0xA9, 0x3B, 0x00, 0xA0, 0xC9,
0x0F, 0x27, 0x19} };
static const IContextMenu2Vtbl cmvt;
static WCHAR szNew[100];
@@ -791,7 +791,7 @@
INewItem_IContextMenu_fnHandleMenuMsg
};
-HRESULT WINAPI INewItem_Constructor(LPSHELLFOLDER pSFParent, REFIID riid, LPVOID *ppv)
+HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv)
{
INewMenuImpl * ow;
HRESULT res;
@@ -820,8 +820,8 @@
{
IShellFolder_Release(cached_ow->pSFParent);
}
- cached_ow->pSFParent = pSFParent;
- IShellFolder_AddRef(pSFParent);
+ // cached_ow->pSFParent = pSFParent;
+ // IShellFolder_AddRef(pSFParent);
res = INewItem_fnQueryInterface( cached_ow, riid, ppv );
return res;