Author: janderwald
Date: Thu Oct 20 20:28:30 2011
New Revision: 54217
URL:
http://svn.reactos.org/svn/reactos?rev=54217&view=rev
Log:
[SHELL32]
- Hackfix shell new item service
- Add support for SID_IFolderView
Modified:
trunk/reactos/dll/win32/shell32/shlview.cpp
trunk/reactos/dll/win32/shell32/shv_item_new.cpp
trunk/reactos/dll/win32/shell32/shv_item_new.h
Modified: trunk/reactos/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] Thu Oct 20 20:28:30 2011
@@ -2817,6 +2817,9 @@
{
if (IsEqualIID(guidService, SID_IShellBrowser))
return pShellBrowser->QueryInterface(riid, ppvObject);
+ else if(IsEqualIID(guidService, SID_IFolderView))
+ return QueryInterface(riid, ppvObject);
+
return E_NOINTERFACE;
}
Modified: trunk/reactos/dll/win32/shell32/shv_item_new.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_item_new.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shv_item_new.cpp [iso-8859-1] Thu Oct 20 20:28:30
2011
@@ -336,7 +336,7 @@
}
HRESULT
-CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi)
+CNewMenu::DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView *psv)
{
SHELLNEW_ITEM *pCurItem = s_SnHead;
IPersistFolder3 * psf;
@@ -372,9 +372,9 @@
if (!pCurItem)
return E_UNEXPECTED;
- if (fSite == NULL)
- return E_FAIL;
- hResult = IUnknown_QueryService(fSite, SID_IFolderView, IID_IFolderView, (void
**)&folderView);
+ //if (fSite == NULL)
+ // return E_FAIL;
+ hResult = IUnknown_QueryService(psv, SID_IFolderView, IID_IFolderView, (void
**)&folderView);
if (FAILED(hResult))
return hResult;
hResult = folderView->GetFolder(IID_IShellFolder, (void **)&parentFolder);
@@ -575,9 +575,9 @@
CComPtr<IShellFolder> parentFolder;
HRESULT hResult;
- if (fSite == NULL)
- return;
- hResult = IUnknown_QueryService(fSite, SID_IFolderView, IID_IFolderView, (void
**)&folderView);
+ //if (fSite == NULL)
+ // return;
+ hResult = IUnknown_QueryService(psv, SID_IFolderView, IID_IFolderView, (void
**)&folderView);
if (FAILED(hResult))
return;
hResult = folderView->GetFolder(IID_IShellFolder, (void **)&parentFolder);
@@ -620,8 +620,8 @@
if (ppvSite == NULL)
return E_POINTER;
*ppvSite = fSite;
- if (fSite.p != NULL)
- fSite.p->AddRef();
+ if (fSite != NULL)
+ fSite->AddRef();
return S_OK;
}
@@ -690,7 +690,7 @@
return S_OK;
}
- hr = DoShellNewCmd(lpici);
+ hr = DoShellNewCmd(lpici, lpSV);
if (SUCCEEDED(hr) && lpSV)
{
lpSV->Refresh();
Modified: trunk/reactos/dll/win32/shell32/shv_item_new.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shv_item…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shv_item_new.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shv_item_new.h [iso-8859-1] Thu Oct 20 20:28:30 2011
@@ -51,7 +51,7 @@
LPWSTR szPath;
SHELLNEW_ITEM *s_SnHead;
- CComPtr<IUnknown> fSite;
+ IUnknown* fSite;
public:
CNewMenu();
~CNewMenu();
@@ -60,7 +60,7 @@
void UnloadShellItems();
BOOL LoadShellNewItems();
UINT InsertShellNewItems(HMENU hMenu, UINT idFirst, UINT idMenu);
- HRESULT DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi);
+ HRESULT DoShellNewCmd(LPCMINVOKECOMMANDINFO lpcmi, IShellView * psv);
HRESULT DoMeasureItem(HWND hWnd, MEASUREITEMSTRUCT *lpmis);
HRESULT DoDrawItem(HWND hWnd, DRAWITEMSTRUCT *drawItem);
void DoNewFolder(IShellView *psv);