mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 00:50:40 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user