1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

Bug fix for installer/uninstaller not working and small improvements.

This commit is contained in:
Valentin Radu 2021-08-20 01:27:17 +03:00
parent 65581438d0
commit cd2a543f3e
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,6 @@ int install_uninstall()
szReadName, szReadName,
(LPDWORD)(&dwReadBytes) (LPDWORD)(&dwReadBytes)
); );
RegCloseKey(hKey);
if (!wcscmp(szFileName, szReadName)) if (!wcscmp(szFileName, szReadName))
{ {
if (RegDeleteValue( if (RegDeleteValue(
@ -151,8 +150,10 @@ int install_uninstall()
MB_ICONINFORMATION MB_ICONINFORMATION
); );
} }
RegCloseKey(hKey);
return 1; return 1;
error_setup: error_setup:
RegCloseKey(hKey);
#ifdef UNICODE #ifdef UNICODE
swprintf(buffer, 200, swprintf(buffer, 200,
#else #else

View File

@ -559,8 +559,6 @@ INT64 CTray_HandleGlobalHotkeyHook(
return 0; return 0;
} }
InterlockedExchange64(&lockEnsureWinXHotkeyOnlyOnce, 1);
HWND hWnd = GetForegroundWindow(); HWND hWnd = GetForegroundWindow();
HWND g_ProgWin = FindWindowEx( HWND g_ProgWin = FindWindowEx(
NULL, NULL,
@ -595,6 +593,7 @@ INT64 CTray_HandleGlobalHotkeyHook(
ip[3].ki.dwExtraInfo = 0; ip[3].ki.dwExtraInfo = 0;
ip[3].ki.wVk = VK_LWIN; ip[3].ki.wVk = VK_LWIN;
ip[3].ki.dwFlags = KEYEVENTF_KEYUP; ip[3].ki.dwFlags = KEYEVENTF_KEYUP;
InterlockedExchange64(&lockEnsureWinXHotkeyOnlyOnce, 1);
SendInput(4, ip, sizeof(INPUT)); SendInput(4, ip, sizeof(INPUT));
SetForegroundWindow(hWnd); SetForegroundWindow(hWnd);