ext/asyncengine/libuv/src/win/winapi.c in asyncengine-0.0.1.testing1 vs ext/asyncengine/libuv/src/win/winapi.c in asyncengine-0.0.2.alpha1

- old
+ new

@@ -20,21 +20,26 @@ */ #include <assert.h> #include "uv.h" -#include "../uv-common.h" #include "internal.h" +/* Ntdll function pointers */ sRtlNtStatusToDosError pRtlNtStatusToDosError; sNtDeviceIoControlFile pNtDeviceIoControlFile; sNtQueryInformationFile pNtQueryInformationFile; sNtSetInformationFile pNtSetInformationFile; +sNtQuerySystemInformation pNtQuerySystemInformation; + + +/* Kernel32 function pointers */ sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx; sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes; sCreateSymbolicLinkW pCreateSymbolicLinkW; +sCancelIoEx pCancelIoEx; sInitializeSRWLock pInitializeSRWLock; sAcquireSRWLockShared pAcquireSRWLockShared; sAcquireSRWLockExclusive pAcquireSRWLockExclusive; sTryAcquireSRWLockShared pTryAcquireSRWLockShared; sTryAcquireSRWLockExclusive pTryAcquireSRWLockExclusive; @@ -77,10 +82,17 @@ "NtSetInformationFile"); if (pNtSetInformationFile == NULL) { uv_fatal_error(GetLastError(), "GetProcAddress"); } + pNtQuerySystemInformation = (sNtQuerySystemInformation) GetProcAddress( + ntdll_module, + "NtQuerySystemInformation"); + if (pNtQuerySystemInformation == NULL) { + uv_fatal_error(GetLastError(), "GetProcAddress"); + } + kernel32_module = GetModuleHandleA("kernel32.dll"); if (kernel32_module == NULL) { uv_fatal_error(GetLastError(), "GetModuleHandleA"); } @@ -91,9 +103,12 @@ pSetFileCompletionNotificationModes = (sSetFileCompletionNotificationModes) GetProcAddress(kernel32_module, "SetFileCompletionNotificationModes"); pCreateSymbolicLinkW = (sCreateSymbolicLinkW) GetProcAddress(kernel32_module, "CreateSymbolicLinkW"); + + pCancelIoEx = (sCancelIoEx) + GetProcAddress(kernel32_module, "CancelIoEx"); pInitializeSRWLock = (sInitializeSRWLock) GetProcAddress(kernel32_module, "InitializeSRWLock"); pAcquireSRWLockShared = (sAcquireSRWLockShared)