Author: gedmurphy Date: Fri May 2 07:09:39 2008 New Revision: 33234
URL: http://svn.reactos.org/svn/reactos?rev=33234&view=rev Log: - Remove CLSID_RebarBandSite from uuid, and contain it within explorer as it's an undoc GUID - Load SHInvokeDefaultCommand when required to avoid msvc linker dependencies - explorer_new now builds and links with msvc9, although it'll crash if you try to run it at the moment. Investigation needed.
Modified: trunk/reactos/base/shell/explorer-new/explorer.c trunk/reactos/base/shell/explorer-new/precomp.h trunk/reactos/base/shell/explorer-new/startmnu.c trunk/reactos/base/shell/explorer-new/undoc.h trunk/reactos/lib/sdk/uuid/uuid.c
Modified: trunk/reactos/base/shell/explorer-new/explorer.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/exp... ============================================================================== --- trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/explorer.c [iso-8859-1] Fri May 2 07:09:39 2008 @@ -24,6 +24,9 @@ HANDLE hProcessHeap; HKEY hkExplorer = NULL;
+/* undoc GUID */ +DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1); + LONG SetWindowStyle(IN HWND hWnd, IN LONG dwStyleMask,
Modified: trunk/reactos/base/shell/explorer-new/precomp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/pre... ============================================================================== --- trunk/reactos/base/shell/explorer-new/precomp.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/precomp.h [iso-8859-1] Fri May 2 07:09:39 2008 @@ -21,11 +21,13 @@ #include "resource.h" #include "comcsup.h" #include "todo.h" +#include "initguid.h" #include "undoc.h"
/* dynamic imports due to lack of support in msvc linker libs */ typedef INT (STDCALL *REGSHELLHOOK)(HWND, DWORD); typedef BOOL (STDCALL *DRAWCAPTEMP)(HWND, HDC, const RECT*, HFONT, HICON, LPCWSTR, UINT); +typedef HRESULT (STDCALL *SHINVDEFCMD)(HWND, IShellFolder*, LPCITEMIDLIST);
static ULONG __inline Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
Modified: trunk/reactos/base/shell/explorer-new/startmnu.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/sta... ============================================================================== --- trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/startmnu.c [iso-8859-1] Fri May 2 07:09:39 2008 @@ -471,12 +471,32 @@ IN IShellFolder *pShellFolder, IN LPCITEMIDLIST pidl) { + HMODULE hShlwapi; + HRESULT ret = S_FALSE; + IStartMenuSiteImpl *This = IStartMenuSiteImpl_from_IStartMenuCallback(iface);
DbgPrint("IStartMenuCallback::Execute\n"); - return SHInvokeDefaultCommand(ITrayWindow_GetHWND(This->Tray), - pShellFolder, - pidl); + + hShlwapi = LoadLibrary(TEXT("SHLWAPI.DLL")); + if (hShlwapi != NULL) + { + SHINVDEFCMD SHInvokeDefCmd; + + /* SHInvokeDefaultCommand */ + SHInvokeDefCmd = (SHINVDEFCMD)GetProcAddress(hShlwapi, + (LPCSTR)((LONG)279)); + if (SHInvokeDefCmd != NULL) + { + ret = SHInvokeDefCmd(ITrayWindow_GetHWND(This->Tray), + pShellFolder, + pidl); + } + + FreeLibrary(hShlwapi); + } + + return ret; }
static HRESULT STDMETHODCALLTYPE
Modified: trunk/reactos/base/shell/explorer-new/undoc.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer-new/und... ============================================================================== --- trunk/reactos/base/shell/explorer-new/undoc.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer-new/undoc.h [iso-8859-1] Fri May 2 07:09:39 2008 @@ -228,8 +228,7 @@ #define DrawCaptionTemp DrawCaptionTempA #endif
-DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1); -DEFINE_GUID(IID_IDeskBand, 0xEB0FE172, 0x1A3A, 0x11D0, 0x89, 0xB3, 0x00, 0xA0, 0xC9, 0x0A, 0x90, 0xAC); +EXTERN_C const GUID CLSID_RebarBandSite;
HRESULT WINAPI SHInvokeDefaultCommand(HWND,IShellFolder*,LPCITEMIDLIST);
Modified: trunk/reactos/lib/sdk/uuid/uuid.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/uuid/uuid.c?rev=332... ============================================================================== --- trunk/reactos/lib/sdk/uuid/uuid.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/uuid/uuid.c [iso-8859-1] Fri May 2 07:09:39 2008 @@ -122,4 +122,3 @@ DEFINE_GUID(CLSID_StdEvent, 0x0000032b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); DEFINE_GUID(CLSID_SynchronizeContainer, 0x0000032d,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46); -DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);