mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-28 01:10:55 +01:00
Close registry key in GUI
This commit is contained in:
parent
12e0733c56
commit
958a9a6b20
@ -603,7 +603,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
if (d) *d = 0;
|
if (d) *d = 0;
|
||||||
wchar_t* p = wcschr(name, L'"');
|
wchar_t* p = wcschr(name, L'"');
|
||||||
if (p) *p = 0;
|
if (p) *p = 0;
|
||||||
HKEY hKey;
|
HKEY hKey = NULL;
|
||||||
DWORD dwDisposition;
|
DWORD dwDisposition;
|
||||||
DWORD dwSize = sizeof(DWORD);
|
DWORD dwSize = sizeof(DWORD);
|
||||||
DWORD value = FALSE;
|
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)
|
__declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey = NULL;
|
||||||
DWORD dwDisposition;
|
DWORD dwDisposition;
|
||||||
DWORD dwSize = sizeof(DWORD);
|
DWORD dwSize = sizeof(DWORD);
|
||||||
RegCreateKeyExW(
|
RegCreateKeyExW(
|
||||||
@ -1193,6 +1193,10 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin
|
|||||||
stdout
|
stdout
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (hKey)
|
||||||
|
{
|
||||||
|
RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
|
||||||
printf("Started \"GUI\" thread.\n");
|
printf("Started \"GUI\" thread.\n");
|
||||||
|
|
||||||
@ -1301,4 +1305,4 @@ __declspec(dllexport) int ZZGUI(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLin
|
|||||||
}
|
}
|
||||||
|
|
||||||
printf("Ended \"GUI\" thread.\n");
|
printf("Ended \"GUI\" thread.\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user