aboutsummaryrefslogtreecommitdiff
path: root/deps/uv/src/win/winapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/uv/src/win/winapi.c')
-rw-r--r--deps/uv/src/win/winapi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/deps/uv/src/win/winapi.c b/deps/uv/src/win/winapi.c
index 19e4377faf..85a9de8a22 100644
--- a/deps/uv/src/win/winapi.c
+++ b/deps/uv/src/win/winapi.c
@@ -36,6 +36,9 @@ sNtQueryDirectoryFile pNtQueryDirectoryFile;
sNtQuerySystemInformation pNtQuerySystemInformation;
sNtQueryInformationProcess pNtQueryInformationProcess;
+/* Advapi32 function pointers */
+sRtlGenRandom pRtlGenRandom;
+
/* Kernel32 function pointers */
sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
@@ -51,6 +54,7 @@ void uv_winapi_init(void) {
HMODULE powrprof_module;
HMODULE user32_module;
HMODULE kernel32_module;
+ HMODULE advapi32_module;
ntdll_module = GetModuleHandleA("ntdll.dll");
if (ntdll_module == NULL) {
@@ -135,4 +139,11 @@ void uv_winapi_init(void) {
GetProcAddress(user32_module, "SetWinEventHook");
}
+ advapi32_module = GetModuleHandleA("advapi32.dll");
+ if (advapi32_module == NULL) {
+ uv_fatal_error(GetLastError(), "GetModuleHandleA");
+ }
+
+ pRtlGenRandom =
+ (sRtlGenRandom) GetProcAddress(advapi32_module, "SystemFunction036");
}