terminate the process before displaying the error message

This commit is contained in:
otavepto 2023-12-24 06:42:25 +02:00
parent 31d12fb0f9
commit a57d9d5db7

View File

@ -135,8 +135,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
if (RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\Valve\\Steam\\ActiveProcess", 0, 0, REG_OPTION_NON_VOLATILE, if (RegCreateKeyExW(HKEY_CURRENT_USER, L"Software\\Valve\\Steam\\ActiveProcess", 0, 0, REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS, NULL, &Registrykey, NULL) != ERROR_SUCCESS) KEY_ALL_ACCESS, NULL, &Registrykey, NULL) != ERROR_SUCCESS)
{ {
MessageBoxA(NULL, "Unable to patch Steam process informations on the Windows registry.", "ColdClientLoader", MB_ICONERROR);
TerminateProcess(processInfo.hProcess, NULL); TerminateProcess(processInfo.hProcess, NULL);
MessageBoxA(NULL, "Unable to patch Steam process informations on the Windows registry.", "ColdClientLoader", MB_ICONERROR);
return 1; return 1;
} }
} }