1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-24 07:30:22 +01:00

Close registry key in GUI

This commit is contained in:
Valentin-Gabriel Radu 2021-10-10 22:37:47 +03:00 committed by GitHub
parent 12e0733c56
commit 958a9a6b20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -603,7 +603,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
if (d) *d = 0;
wchar_t* p = wcschr(name, L'"');
if (p) *p = 0;
HKEY hKey;
HKEY hKey = NULL;
DWORD dwDisposition;
DWORD dwSize = sizeof(DWORD);
DWORD value = FALSE;
@ -1159,7 +1159,7 @@ static LRESULT CALLBACK GUI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
__declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{
HKEY hKey;
HKEY hKey = NULL;
DWORD dwDisposition;
DWORD dwSize = sizeof(DWORD);
RegCreateKeyExW(
@ -1193,6 +1193,10 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin
stdout
);
}
if (hKey)
{
RegCloseKey(hKey);
}
printf("Started \"GUI\" thread.\n");