Author: gedmurphy
Date: Sun May 15 15:42:03 2011
New Revision: 51766
URL:
http://svn.reactos.org/svn/reactos?rev=51766&view=rev
Log:
Add the Windows version of SHIShellFolder_EnumObjects, but compile it out as per
Wine's notes
Move the scope in the reg script
Modified:
trunk/reactos/dll/win32/browseui/res/addressband.rgs
trunk/reactos/dll/win32/shlwapi/ordinal.c
Modified: trunk/reactos/dll/win32/browseui/res/addressband.rgs
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/res/add…
==============================================================================
--- trunk/reactos/dll/win32/browseui/res/addressband.rgs [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/res/addressband.rgs [iso-8859-1] Sun May 15 15:42:03
2011
@@ -2,9 +2,9 @@
{
NoRemove CLSID
{
- val MenuTextPUI = s '(a)browseui.dll,-13137'
ForceRemove {01E04581-4EEE-11d0-BFE9-00AA005B4383} = s '&Address'
{
+ val MenuTextPUI = s '(a)browseui.dll,-13137'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
Modified: trunk/reactos/dll/win32/shlwapi/ordinal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shlwapi/ordinal.…
==============================================================================
--- trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shlwapi/ordinal.c [iso-8859-1] Sun May 15 15:42:03 2011
@@ -144,7 +144,7 @@
* the view pointer returned by this size.
*
*/
-HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
+HANDLE WINAPI SHAllocShared(LPVOID lpvData, ULONG dwSize, DWORD dwProcId)
{
HANDLE hMap;
LPVOID pMapped;
@@ -3735,6 +3735,7 @@
/*************************************************************************
* @ [SHLWAPI.404]
*/
+#if 1
HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF
flags, IEnumIDList **ppenum)
{
/* Windows attempts to get an IPersist interface and, if that fails, an
@@ -3751,6 +3752,29 @@
return IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum);
}
+#else
+HRESULT WINAPI SHIShellFolder_EnumObjects(LPSHELLFOLDER lpFolder, HWND hwnd, SHCONTF
flags, IEnumIDList **ppenum)
+{
+ IPersist *persist;
+ HRESULT hr;
+
+ hr = IShellFolder_QueryInterface(lpFolder, &IID_IPersist, (LPVOID)&persist);
+ if(SUCCEEDED(hr))
+ {
+ CLSID clsid;
+ hr = IPersist_GetClassID(persist, &clsid);
+ if(SUCCEEDED(hr))
+ {
+ if(IsEqualCLSID(&clsid, &CLSID_ShellFSFolder))
+ hr = IShellFolder_EnumObjects(lpFolder, hwnd, flags, ppenum);
+ else
+ hr = E_FAIL;
+ }
+ IPersist_Release(persist);
+ }
+ return hr;
+}
+#endif
/* INTERNAL: Map from HLS color space to RGB */
static WORD ConvertHue(int wHue, WORD wMid1, WORD wMid2)