Browse Source

Protect taskbar style state variable from changing once its setting is read from the registry

pull/886/head
Valentin Radu 4 years ago
parent
commit
065acae2c4
  1. 9
      ExplorerPatcher/dllmain.c

9
ExplorerPatcher/dllmain.c

@ -47,6 +47,7 @@ BOOL bIsExplorerProcess = FALSE;
BOOL bInstanced = FALSE; BOOL bInstanced = FALSE;
HWND archivehWnd; HWND archivehWnd;
DWORD bOldTaskbar = TRUE; DWORD bOldTaskbar = TRUE;
DWORD bWasOldTaskbarSet = FALSE;
DWORD bAllocConsole = FALSE; DWORD bAllocConsole = FALSE;
DWORD bHideExplorerSearchBar = FALSE; DWORD bHideExplorerSearchBar = FALSE;
DWORD bMicaEffectOnTitlebar = FALSE; DWORD bMicaEffectOnTitlebar = FALSE;
@ -4152,15 +4153,21 @@ void WINAPI LoadSettings(LPARAM lParam)
RegCloseKey(hKey); RegCloseKey(hKey);
return; return;
} }
dwTemp = TRUE;
dwSize = sizeof(DWORD); dwSize = sizeof(DWORD);
RegQueryValueExW( RegQueryValueExW(
hKey, hKey,
TEXT("OldTaskbar"), TEXT("OldTaskbar"),
0, 0,
NULL, NULL,
&bOldTaskbar, &dwTemp,
&dwSize &dwSize
); );
if (!bWasOldTaskbarSet)
{
bOldTaskbar = dwTemp;
bWasOldTaskbarSet = TRUE;
}
dwSize = sizeof(DWORD); dwSize = sizeof(DWORD);
RegQueryValueExW( RegQueryValueExW(
hKey, hKey,

Loading…
Cancel
Save