Fix CheckHookThread calling convention

`CreateThread` expects `lpStartAddress` to be a function with the
signature
DWORD WINAPI ThreadProc(
  _In_ LPVOID lpParameter
);
on Win32 `WINAPI` is `__stdcall`, but `CheckHookThread` previously
had the effective signature
DWORD __cdecl CheckHookThread(LPVOID param);
because the calling convention was unspecified. The cast that was hiding
this error is also removed.
This commit is contained in:
widberg
2026-03-23 14:15:34 -04:00
committed by Baldur Karlsson
parent feb00dc235
commit 6aca8fac04
+2 -2
View File
@@ -151,7 +151,7 @@ void CheckHook()
CloseHandle(datahandle);
}
DWORD CheckHookThread(LPVOID param)
DWORD WINAPI CheckHookThread(LPVOID param)
{
CheckHook();
@@ -170,7 +170,7 @@ BOOL APIENTRY dll_entry(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpRese
// create a thread so that we can perform more complex actions (DllMain must be minimal
// in size, even this is a bit dodgy).
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)&CheckHookThread, (LPVOID)hModule, 0, NULL);
CreateThread(NULL, 0, CheckHookThread, (LPVOID)hModule, 0, NULL);
}
return TRUE;