From 400a835c4260653343ff82e2d0f8d57b3c6d62ba Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Thu, 21 Nov 2013 11:28:53 +0000 Subject: [PATCH] [explorer_new] - call ShellDDEInit, FileIconInit and WinList_Init while initializing - Calling ShellDDEInit fixes cases like pressing Explore in a folder context menu from a file open dialog (before this it just hanged) - We also need to call FileIconInit in order to initialize the shell icons properly. Before this Shell_GetImageLists called FileIconInit in case it was not called - Calling WinList_Init should make CLSID_ShellWindows work but it fails for now. CLSID_ShellWindows is needed in cases like opening a second time My computer from desktop should activates the existing My computer window and it is also needed for SHOpenFolderAndSelectItems in order to work svn path=/trunk/; revision=61064 --- reactos/base/shell/explorer-new/explorer.c | 9 +++++++++ reactos/include/psdk/shlobj_undoc.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/reactos/base/shell/explorer-new/explorer.c b/reactos/base/shell/explorer-new/explorer.c index 5c9ab725a15..e0a31fc561d 100644 --- a/reactos/base/shell/explorer-new/explorer.c +++ b/reactos/base/shell/explorer-new/explorer.c @@ -410,6 +410,15 @@ _tWinMain(IN HINSTANCE hInstance, if (CreateShellDesktop) { + /* Initialize shell dde support */ + ShellDDEInit(TRUE); + + /* Initialize shell icons */ + FileIconInit(TRUE); + + /* Initialize CLSID_ShellWindows class */ + WinList_Init(); + if (RegisterTrayWindowClass() && RegisterTaskSwitchWndClass()) { Tray = CreateTrayWindow(); diff --git a/reactos/include/psdk/shlobj_undoc.h b/reactos/include/psdk/shlobj_undoc.h index ba882ae8e16..00bc21b43e8 100644 --- a/reactos/include/psdk/shlobj_undoc.h +++ b/reactos/include/psdk/shlobj_undoc.h @@ -755,6 +755,10 @@ BOOL WINAPI ILGetDisplayNameEx(IShellFolder *psf, LPCITEMIDLIST pidl, LPVOID pat #define ILGDN_NORMAL 1 #define ILGDN_INFOLDER 2 +BOOL WINAPI FileIconInit(BOOL bFullInit); +void WINAPI ShellDDEInit(BOOL bInit); +DWORD WINAPI WinList_Init(void); + HANDLE WINAPI SHCreateDesktop(IShellDesktopTray*); BOOL WINAPI SHDesktopMessageLoop(HANDLE);