summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/win/winapi.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-22 18:10:43 (GMT)
committerBrad King <brad.king@kitware.com>2022-09-27 13:50:16 (GMT)
commitff82df301c6db009200cbe3869fa03b86a573253 (patch)
treedf3700f506d1f03ce8176bc3fd3e8aa872630cce /Utilities/cmlibuv/src/win/winapi.c
parentcfe8fd64217d42c7a5c8a12c65feddbace86ce21 (diff)
parenta23da1559648995998343f3ae63076db736b55a5 (diff)
downloadCMake-ff82df301c6db009200cbe3869fa03b86a573253.zip
CMake-ff82df301c6db009200cbe3869fa03b86a573253.tar.gz
CMake-ff82df301c6db009200cbe3869fa03b86a573253.tar.bz2
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv: libuv 2022-07-12 (0c1fa696)
Diffstat (limited to 'Utilities/cmlibuv/src/win/winapi.c')
-rw-r--r--Utilities/cmlibuv/src/win/winapi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmlibuv/src/win/winapi.c b/Utilities/cmlibuv/src/win/winapi.c
index bf306cd..53147b8 100644
--- a/Utilities/cmlibuv/src/win/winapi.c
+++ b/Utilities/cmlibuv/src/win/winapi.c
@@ -48,7 +48,7 @@ sSetWinEventHook pSetWinEventHook;
/* ws2_32.dll function pointer */
uv_sGetHostNameW pGetHostNameW;
-void uv_winapi_init(void) {
+void uv__winapi_init(void) {
HMODULE ntdll_module;
HMODULE powrprof_module;
HMODULE user32_module;
@@ -126,19 +126,19 @@ void uv_winapi_init(void) {
kernel32_module,
"GetQueuedCompletionStatusEx");
- powrprof_module = LoadLibraryA("powrprof.dll");
+ powrprof_module = LoadLibraryExA("powrprof.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32);
if (powrprof_module != NULL) {
pPowerRegisterSuspendResumeNotification = (sPowerRegisterSuspendResumeNotification)
GetProcAddress(powrprof_module, "PowerRegisterSuspendResumeNotification");
}
- user32_module = LoadLibraryA("user32.dll");
+ user32_module = GetModuleHandleA("user32.dll");
if (user32_module != NULL) {
pSetWinEventHook = (sSetWinEventHook)
GetProcAddress(user32_module, "SetWinEventHook");
}
- ws2_32_module = LoadLibraryA("ws2_32.dll");
+ ws2_32_module = GetModuleHandleA("ws2_32.dll");
if (ws2_32_module != NULL) {
pGetHostNameW = (uv_sGetHostNameW) GetProcAddress(
ws2_32_module,