aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorchemodax <53048645+chemodax@users.noreply.github.com>2025-06-29 20:32:14 +0200
committerGitHub <noreply@github.com>2025-06-29 20:32:14 +0200
commit2545ffe74c6a348c9ef7bf90fa05c6d06a8cc91d (patch)
treebb26636f0b7b957e8b63cf8b9d0f64de92fa1a28 /src
parent513751e2fcf1b5be5238de66b2c06f3e0623aca0 (diff)
downloadlibuv-2545ffe74c6a348c9ef7bf90fa05c6d06a8cc91d.tar.gz
libuv-2545ffe74c6a348c9ef7bf90fa05c6d06a8cc91d.zip
win: replace GetModuleHandleA with GetModuleHandleW (#4812)
Diffstat (limited to 'src')
-rw-r--r--src/win/thread.c2
-rw-r--r--src/win/winapi.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/win/thread.c b/src/win/thread.c
index 753cb6a3..9c38e3d8 100644
--- a/src/win/thread.c
+++ b/src/win/thread.c
@@ -284,7 +284,7 @@ int uv_thread_equal(const uv_thread_t* t1, const uv_thread_t* t2) {
static void uv__thread_name_init_once(void) {
HMODULE m;
- m = GetModuleHandleA("api-ms-win-core-processthreads-l1-1-3.dll");
+ m = GetModuleHandleW(L"api-ms-win-core-processthreads-l1-1-3.dll");
if (m != NULL) {
pGetThreadDescription = (void*) GetProcAddress(m, "GetThreadDescription");
pSetThreadDescription = (void*) GetProcAddress(m, "SetThreadDescription");
diff --git a/src/win/winapi.c b/src/win/winapi.c
index 315a0d49..786a9daa 100644
--- a/src/win/winapi.c
+++ b/src/win/winapi.c
@@ -55,9 +55,9 @@ void uv__winapi_init(void) {
HMODULE ws2_32_module;
HMODULE api_win_core_file_module;
- ntdll_module = GetModuleHandleA("ntdll.dll");
+ ntdll_module = GetModuleHandleW(L"ntdll.dll");
if (ntdll_module == NULL) {
- uv_fatal_error(GetLastError(), "GetModuleHandleA");
+ uv_fatal_error(GetLastError(), "GetModuleHandleW");
}
pRtlGetVersion = (sRtlGetVersion) GetProcAddress(ntdll_module,
@@ -123,20 +123,20 @@ void uv__winapi_init(void) {
GetProcAddress(powrprof_module, "PowerRegisterSuspendResumeNotification");
}
- user32_module = GetModuleHandleA("user32.dll");
+ user32_module = GetModuleHandleW(L"user32.dll");
if (user32_module != NULL) {
pSetWinEventHook = (sSetWinEventHook)
GetProcAddress(user32_module, "SetWinEventHook");
}
- ws2_32_module = GetModuleHandleA("ws2_32.dll");
+ ws2_32_module = GetModuleHandleW(L"ws2_32.dll");
if (ws2_32_module != NULL) {
pGetHostNameW = (uv_sGetHostNameW) GetProcAddress(
ws2_32_module,
"GetHostNameW");
}
- api_win_core_file_module = GetModuleHandleA("api-ms-win-core-file-l2-1-4.dll");
+ api_win_core_file_module = GetModuleHandleW(L"api-ms-win-core-file-l2-1-4.dll");
if (api_win_core_file_module != NULL) {
pGetFileInformationByName = (sGetFileInformationByName)GetProcAddress(
api_win_core_file_module, "GetFileInformationByName");