Skip to content

Commit

Permalink
win32: thread: use kernelbase.dll to get the thread name API
Browse files Browse the repository at this point in the history
This is what the documentation [1] says we should use.
Kernel32.dll is just redirecting to api-ms-win-core-processthreads-l1-1-3.dll
but kernelbase.dll is not a redirection.

[1] https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreaddescription
  • Loading branch information
robUx4 committed Aug 12, 2022
1 parent f715149 commit dcebc09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win32/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ BOOL WINAPI DllMain (HANDLE hinstDll, DWORD fdwReason, LPVOID lpvReserved)
case DLL_PROCESS_ATTACH:
{
HMODULE h;
h = GetModuleHandle(TEXT("kernel32.dll"));
h = GetModuleHandle(TEXT("kernelbase.dll"));
if (h == NULL)
h = GetModuleHandle(TEXT("api-ms-win-core-processthreads-l1-1-3.dll"));
if (h != NULL)
Expand Down

0 comments on commit dcebc09

Please sign in to comment.