diff options
author | Brad King <brad.king@kitware.com> | 2018-01-22 15:18:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-22 15:18:44 (GMT) |
commit | 63f263b27fa9b9c63f038ff108118726bc9c5c64 (patch) | |
tree | 7022b7804d75353ed9d32570dff17b8ffe71feaf /Utilities/cmlibuv/src/win/winapi.c | |
parent | c81ace7ab7e5e325fef9339ed3ea05abbd0f8be4 (diff) | |
parent | 6db7b35236b81a73047a47c0f70f8befbf2ca51f (diff) | |
download | CMake-63f263b27fa9b9c63f038ff108118726bc9c5c64.zip CMake-63f263b27fa9b9c63f038ff108118726bc9c5c64.tar.gz CMake-63f263b27fa9b9c63f038ff108118726bc9c5c64.tar.bz2 |
Merge topic 'update-libuv'
6db7b352 libuv: Update build within CMake
b58d48c1 Merge branch 'upstream-libuv' into update-libuv
f4a26c74 libuv 2018-01-19 (63de1eca)
e8b57c22 libuv: Teach import script to add missing newlines
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1666
Diffstat (limited to 'Utilities/cmlibuv/src/win/winapi.c')
-rw-r--r-- | Utilities/cmlibuv/src/win/winapi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/win/winapi.c b/Utilities/cmlibuv/src/win/winapi.c index aa5d719..4ccdf0a 100644 --- a/Utilities/cmlibuv/src/win/winapi.c +++ b/Utilities/cmlibuv/src/win/winapi.c @@ -52,11 +52,15 @@ sGetFinalPathNameByHandleW pGetFinalPathNameByHandleW; /* Powrprof.dll function pointer */ sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification; +/* User32.dll function pointer */ +sSetWinEventHook pSetWinEventHook; + void uv_winapi_init(void) { HMODULE ntdll_module; HMODULE kernel32_module; HMODULE powrprof_module; + HMODULE user32_module; ntdll_module = GetModuleHandleA("ntdll.dll"); if (ntdll_module == NULL) { @@ -156,4 +160,10 @@ void uv_winapi_init(void) { GetProcAddress(powrprof_module, "PowerRegisterSuspendResumeNotification"); } + user32_module = LoadLibraryA("user32.dll"); + if (user32_module != NULL) { + pSetWinEventHook = (sSetWinEventHook) + GetProcAddress(user32_module, "SetWinEventHook"); + } + } |