diff --git a/base/shell/explorer-new/explorer.c b/base/shell/explorer-new/explorer.c index 36980e6ed23..fe30d620352 100644 --- a/base/shell/explorer-new/explorer.c +++ b/base/shell/explorer-new/explorer.c @@ -392,14 +392,22 @@ _tWinMain(IN HINSTANCE hInstance, if (GetShellWindow() == NULL) CreateShellDesktop = TRUE; - /* FIXME - initialize SSO Thread */ - if (!CreateShellDesktop) { EXPLORER_CMDLINE_PARSE_RESULTS parseResults = { 0 }; if (SHExplorerParseCmdLine(&parseResults)) return SHCreateFromDesktop(&parseResults); + + if (parseResults.strPath) + SHFree(parseResults.strPath); + + if (parseResults.pidlPath) + ILFree(parseResults.pidlPath); + + if (parseResults.pidlRoot) + ILFree(parseResults.pidlRoot); + } if (RegOpenKey(HKEY_CURRENT_USER, diff --git a/base/shell/filebrowser/filebrowser.c b/base/shell/filebrowser/filebrowser.c index ee5f59e9e12..0acbf2ea346 100644 --- a/base/shell/filebrowser/filebrowser.c +++ b/base/shell/filebrowser/filebrowser.c @@ -37,5 +37,14 @@ int _tmain(int argc, _TCHAR* argv[]) return SHCreateFromDesktop(&parseResults); } + if (parseResults.strPath) + SHFree(parseResults.strPath); + + if (parseResults.pidlPath) + ILFree(parseResults.pidlPath); + + if (parseResults.pidlRoot) + ILFree(parseResults.pidlRoot); + return 0; } diff --git a/base/shell/rshell/CMenuFocusManager.cpp b/base/shell/rshell/CMenuFocusManager.cpp index dbbfcc8982c..f4e758e5dce 100644 --- a/base/shell/rshell/CMenuFocusManager.cpp +++ b/base/shell/rshell/CMenuFocusManager.cpp @@ -641,6 +641,16 @@ LRESULT CMenuFocusManager::GetMsgHook(INT nCode, WPARAM hookWParam, LPARAM hookL HRESULT CMenuFocusManager::PlaceHooks() { + if (m_hMsgFilterHook) + { + WARN("GETMESSAGE hook already placed!\n"); + return S_OK; + } + if (m_hMsgFilterHook) + { + WARN("MSGFILTER hook already placed!\n"); + return S_OK; + } if (m_current->type == TrackedMenuEntry) { TRACE("Entering MSGFILTER hook...\n"); diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index 1ffb0f2f08f..ea89e17ea50 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -1078,8 +1078,11 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder, HICON icSmall = ImageList_GetIcon(himlSmall, indexOpen, 0); HICON icLarge = ImageList_GetIcon(himlLarge, indexOpen, 0); - SendMessage(WM_SETICON, ICON_SMALL, reinterpret_cast(icSmall)); - SendMessage(WM_SETICON, ICON_BIG, reinterpret_cast(icLarge)); + HICON oldSmall = (HICON)SendMessage(WM_SETICON, ICON_SMALL, reinterpret_cast(icSmall)); + HICON oldLarge = (HICON)SendMessage(WM_SETICON, ICON_BIG, reinterpret_cast(icLarge)); + + DestroyIcon(oldSmall); + DestroyIcon(oldLarge); } // TODO: Update the window icon