From dcebc092c30d7903f354e4313951fe81d545c3b3 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 9 Aug 2022 11:55:01 +0200 Subject: [PATCH] win32: thread: use kernelbase.dll to get the thread name API 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 --- src/win32/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/thread.c b/src/win32/thread.c index 90c4fff917d0..6e715c24d9c0 100644 --- a/src/win32/thread.c +++ b/src/win32/thread.c @@ -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)