Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Windows: fetch pointer for CancelIoEx on startup

  • Loading branch information
piscisaureus committed Apr 24, 2012
1 parent 7d45cca commit 9f0dc2601ed5961e739a754b9ad7d194703cc4a1
Showing with 9 additions and 0 deletions.
  1. +4 −0 src/win/winapi.c
  2. +5 −0 src/win/winapi.h
@@ -33,6 +33,7 @@ sNtSetInformationFile pNtSetInformationFile;
sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
sCreateSymbolicLinkW pCreateSymbolicLinkW;
sCancelIoEx pCancelIoEx;
sInitializeSRWLock pInitializeSRWLock;
sAcquireSRWLockShared pAcquireSRWLockShared;
sAcquireSRWLockExclusive pAcquireSRWLockExclusive;
@@ -94,6 +95,9 @@ void uv_winapi_init() {
pCreateSymbolicLinkW = (sCreateSymbolicLinkW)
GetProcAddress(kernel32_module, "CreateSymbolicLinkW");

pCancelIoEx = (sCancelIoEx)
GetProcAddress(kernel32_module, "CancelIoEx");

pInitializeSRWLock = (sInitializeSRWLock)
GetProcAddress(kernel32_module, "InitializeSRWLock");

@@ -4378,6 +4378,10 @@ typedef BOOLEAN (WINAPI* sCreateSymbolicLinkW)
LPCWSTR lpTargetFileName,
DWORD dwFlags);

typedef BOOL (WINAPI* sCancelIoEx)
(HANDLE hFile,
LPOVERLAPPED lpOverlapped);

typedef VOID (WINAPI* sInitializeSRWLock)
(PSRWLOCK SRWLock);

@@ -4412,6 +4416,7 @@ extern sNtSetInformationFile pNtSetInformationFile;
extern sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx;
extern sSetFileCompletionNotificationModes pSetFileCompletionNotificationModes;
extern sCreateSymbolicLinkW pCreateSymbolicLinkW;
extern sCancelIoEx pCancelIoEx;
extern sInitializeSRWLock pInitializeSRWLock;
extern sAcquireSRWLockShared pAcquireSRWLockShared;
extern sAcquireSRWLockExclusive pAcquireSRWLockExclusive;

0 comments on commit 9f0dc26

Please sign in to comment.
You can’t perform that action at this time.