https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5de33ab010f3cb3ab495c…
commit 5de33ab010f3cb3ab495cd1f5cfde60a0257d61d
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Feb 4 02:23:28 2018 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Feb 4 02:23:28 2018 +0100
[STOBJECT] Revert b7c3398 because it was not the cause of the original problem I
wanted to fix (notify structure not completely zeroed-out on the receiver side of the
notification).
---
dll/shellext/stobject/csystray.cpp | 5 ++---
dll/shellext/stobject/hotplug.cpp | 6 ++----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dll/shellext/stobject/csystray.cpp b/dll/shellext/stobject/csystray.cpp
index f75f25d54c..89bd5c5ac0 100644
--- a/dll/shellext/stobject/csystray.cpp
+++ b/dll/shellext/stobject/csystray.cpp
@@ -121,12 +121,11 @@ HRESULT CSysTray::ProcessIconMessage(UINT uMsg, WPARAM wParam,
LPARAM lParam, LR
*--*/
HRESULT CSysTray::NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip, DWORD
dwstate)
{
- NOTIFYICONDATA nim;
+ NOTIFYICONDATA nim = { 0 };
TRACE("NotifyIcon code=%d, uId=%d, hIcon=%p, szTip=%S\n", code, uId, hIcon,
szTip);
- ZeroMemory(&nim, sizeof(nim));
- nim.cbSize = sizeof(nim);
+ nim.cbSize = sizeof(NOTIFYICONDATA);
nim.uFlags = NIF_MESSAGE | NIF_ICON | NIF_STATE | NIF_TIP;
nim.hIcon = hIcon;
nim.uID = uId;
diff --git a/dll/shellext/stobject/hotplug.cpp b/dll/shellext/stobject/hotplug.cpp
index 9550d23960..5c6d3099a8 100644
--- a/dll/shellext/stobject/hotplug.cpp
+++ b/dll/shellext/stobject/hotplug.cpp
@@ -100,10 +100,8 @@ HRESULT EnumHotpluggedDevices(CSimpleArray<DEVINST>
&devList)
*--*/
HRESULT NotifyBalloon(CSysTray* pSysTray, LPCWSTR szTitle = NULL, LPCWSTR szInfo = NULL,
UINT uId = ID_ICON_HOTPLUG)
{
- NOTIFYICONDATA nim;
-
- ZeroMemory(&nim, sizeof(nim));
- nim.cbSize = sizeof(nim);
+ NOTIFYICONDATA nim = { 0 };
+ nim.cbSize = sizeof(NOTIFYICONDATA);
nim.uID = uId;
nim.hWnd = pSysTray->GetHWnd();