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

svn path=/trunk/; revision=30366
This commit is contained in:
Johannes Anderwald 2007-11-11 21:38:44 +00:00
parent 00b588a9c3
commit a6a6521b06
5 changed files with 11 additions and 7 deletions

View file

@ -82,7 +82,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID); LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
IContextMenu2 * ISvItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *aPidls, UINT uItemCount); 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 * ISvStaticItemCm_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST pidl, LPCITEMIDLIST *apidl, UINT cidl, HKEY hKey);
IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop); IContextMenu2 * ISvBgCm_Constructor(LPSHELLFOLDER pSFParent, BOOL bDesktop);
LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER); LPSHELLVIEW IShellView_Constructor(LPSHELLFOLDER);

View file

@ -78,6 +78,7 @@ static const struct {
{&CLSID_Printers, &ISF_Printers_Constructor}, {&CLSID_Printers, &ISF_Printers_Constructor},
{&CLSID_RecycleBin, &RecycleBin_Constructor}, {&CLSID_RecycleBin, &RecycleBin_Constructor},
{&CLSID_OpenWith, &SHEOW_Constructor}, {&CLSID_OpenWith, &SHEOW_Constructor},
{&CLSID_NewMenu, &INewItem_Constructor},
{NULL,NULL} {NULL,NULL}
}; };

View file

@ -226,7 +226,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
* FIXME * FIXME
* load other shell extensions * load other shell extensions
*/ */
#if 0
if (SUCCEEDED(INewItem_Constructor(This->pSFParent, &IID_IContextMenu2, (LPVOID*)&icm))) if (SUCCEEDED(INewItem_Constructor(This->pSFParent, &IID_IContextMenu2, (LPVOID*)&icm)))
{ {
if (SUCCEEDED(IContextMenu_QueryContextMenu(icm, hMenu, 10, idCmdFirst, idCmdLast, uFlags))) if (SUCCEEDED(IContextMenu_QueryContextMenu(icm, hMenu, 10, idCmdFirst, idCmdLast, uFlags)))
@ -239,6 +239,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
This->icm_new = NULL; This->icm_new = NULL;
} }
} }
#endif
if (This->bDesktop) if (This->bDesktop)
{ {

View file

@ -1291,7 +1291,9 @@ HRESULT WINAPI SHCreateDefaultContextMenu(
* *
*/ */
INT CDefFolderMenu_Create2( INT
WINAPI
CDefFolderMenu_Create2(
LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlFolder,
HWND hwnd, HWND hwnd,
UINT cidl, UINT cidl,

View file

@ -55,7 +55,7 @@ typedef struct
PSHELLNEW_ITEM s_SnHead; PSHELLNEW_ITEM s_SnHead;
}INewMenuImpl; }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 const IContextMenu2Vtbl cmvt;
static WCHAR szNew[100]; static WCHAR szNew[100];
@ -791,7 +791,7 @@ static const IContextMenu2Vtbl cmvt =
INewItem_IContextMenu_fnHandleMenuMsg 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; INewMenuImpl * ow;
HRESULT res; HRESULT res;
@ -820,8 +820,8 @@ HRESULT WINAPI INewItem_Constructor(LPSHELLFOLDER pSFParent, REFIID riid, LPVOID
{ {
IShellFolder_Release(cached_ow->pSFParent); IShellFolder_Release(cached_ow->pSFParent);
} }
cached_ow->pSFParent = pSFParent; // cached_ow->pSFParent = pSFParent;
IShellFolder_AddRef(pSFParent); // IShellFolder_AddRef(pSFParent);
res = INewItem_fnQueryInterface( cached_ow, riid, ppv ); res = INewItem_fnQueryInterface( cached_ow, riid, ppv );
return res; return res;