Author: dquintana
Date: Thu Oct 23 19:50:29 2014
New Revision: 64940
URL:
http://svn.reactos.org/svn/reactos?rev=64940&view=rev
Log:
[BROWSEUI]
* Fix icon leak of the returned old icon from WM_SETICON.
[RSHELL]
* Add two debug prints (not hit).
[FILEBROWSER]
[EXPLORER-NEW]
* Free PWSTR pointers after exiting.
Modified:
branches/shell-experiments/base/shell/explorer-new/explorer.c
branches/shell-experiments/base/shell/filebrowser/filebrowser.c
branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp
Modified: branches/shell-experiments/base/shell/explorer-new/explorer.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/ex…
==============================================================================
--- branches/shell-experiments/base/shell/explorer-new/explorer.c [iso-8859-1] (original)
+++ branches/shell-experiments/base/shell/explorer-new/explorer.c [iso-8859-1] Thu Oct 23
19:50:29 2014
@@ -392,14 +392,22 @@
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,
Modified: branches/shell-experiments/base/shell/filebrowser/filebrowser.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/fi…
==============================================================================
--- branches/shell-experiments/base/shell/filebrowser/filebrowser.c [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/filebrowser/filebrowser.c [iso-8859-1] Thu Oct
23 19:50:29 2014
@@ -37,5 +37,14 @@
return SHCreateFromDesktop(&parseResults);
}
+ if (parseResults.strPath)
+ SHFree(parseResults.strPath);
+
+ if (parseResults.pidlPath)
+ ILFree(parseResults.pidlPath);
+
+ if (parseResults.pidlRoot)
+ ILFree(parseResults.pidlRoot);
+
return 0;
}
Modified: branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
==============================================================================
--- branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/base/shell/rshell/CMenuFocusManager.cpp [iso-8859-1] Thu
Oct 23 19:50:29 2014
@@ -641,6 +641,16 @@
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");
Modified: branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/bro…
==============================================================================
--- branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1]
(original)
+++ branches/shell-experiments/dll/win32/browseui/shellbrowser.cpp [iso-8859-1] Thu Oct 23
19:50:29 2014
@@ -1078,8 +1078,11 @@
HICON icSmall = ImageList_GetIcon(himlSmall, indexOpen, 0);
HICON icLarge = ImageList_GetIcon(himlLarge, indexOpen, 0);
- SendMessage(WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icSmall));
- SendMessage(WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(icLarge));
+ HICON oldSmall = (HICON)SendMessage(WM_SETICON, ICON_SMALL,
reinterpret_cast<LPARAM>(icSmall));
+ HICON oldLarge = (HICON)SendMessage(WM_SETICON, ICON_BIG,
reinterpret_cast<LPARAM>(icLarge));
+
+ DestroyIcon(oldSmall);
+ DestroyIcon(oldLarge);
}
// TODO: Update the window icon