51 HMODULE powrprof_module;
52 HMODULE user32_module;
53 HMODULE kernel32_module;
55 ntdll_module = GetModuleHandleA(
"ntdll.dll");
56 if (ntdll_module ==
NULL) {
65 "RtlNtStatusToDosError");
72 "NtDeviceIoControlFile");
79 "NtQueryInformationFile");
86 "NtSetInformationFile");
92 GetProcAddress(ntdll_module,
"NtQueryVolumeInformationFile");
98 GetProcAddress(ntdll_module,
"NtQueryDirectoryFile");
105 "NtQuerySystemInformation");
112 "NtQueryInformationProcess");
117 kernel32_module = GetModuleHandleA(
"kernel32.dll");
118 if (kernel32_module ==
NULL) {
124 "GetQueuedCompletionStatusEx");
126 powrprof_module = LoadLibraryA(
"powrprof.dll");
127 if (powrprof_module !=
NULL) {
129 GetProcAddress(powrprof_module,
"PowerRegisterSuspendResumeNotification");
132 user32_module = LoadLibraryA(
"user32.dll");
133 if (user32_module !=
NULL) {
135 GetProcAddress(user32_module,
"SetWinEventHook");
void uv_fatal_error(const int errorno, const char *syscall)
sNtQueryVolumeInformationFile pNtQueryVolumeInformationFile
sNtQueryDirectoryFile pNtQueryDirectoryFile
sNtQueryInformationProcess pNtQueryInformationProcess
sGetQueuedCompletionStatusEx pGetQueuedCompletionStatusEx
sNtDeviceIoControlFile pNtDeviceIoControlFile
sRtlGetVersion pRtlGetVersion
void uv_winapi_init(void)
sNtSetInformationFile pNtSetInformationFile
sNtQueryInformationFile pNtQueryInformationFile
sSetWinEventHook pSetWinEventHook
sRtlNtStatusToDosError pRtlNtStatusToDosError
sNtQuerySystemInformation pNtQuerySystemInformation
sPowerRegisterSuspendResumeNotification pPowerRegisterSuspendResumeNotification
HWINEVENTHOOK(WINAPI * sSetWinEventHook)(UINT eventMin, UINT eventMax, HMODULE hmodWinEventProc, WINEVENTPROC lpfnWinEventProc, DWORD idProcess, DWORD idThread, UINT dwflags)
BOOL(WINAPI * sGetQueuedCompletionStatusEx)(HANDLE CompletionPort, LPOVERLAPPED_ENTRY lpCompletionPortEntries, ULONG ulCount, PULONG ulNumEntriesRemoved, DWORD dwMilliseconds, BOOL fAlertable)
NTSTATUS(NTAPI * sNtSetInformationFile)(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, ULONG Length, FILE_INFORMATION_CLASS FileInformationClass)
NTSTATUS(NTAPI * sRtlGetVersion)(PRTL_OSVERSIONINFOW lpVersionInformation)
NTSTATUS(NTAPI * sNtQueryInformationProcess)(HANDLE ProcessHandle, UINT ProcessInformationClass, PVOID ProcessInformation, ULONG Length, PULONG ReturnLength)
ULONG(NTAPI * sRtlNtStatusToDosError)(NTSTATUS Status)
NTSTATUS(NTAPI * sNtQueryInformationFile)(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, ULONG Length, FILE_INFORMATION_CLASS FileInformationClass)
DWORD(WINAPI * sPowerRegisterSuspendResumeNotification)(DWORD Flags, HANDLE Recipient, _PHPOWERNOTIFY RegistrationHandle)
NTSTATUS(NTAPI * sNtQueryVolumeInformationFile)(HANDLE FileHandle, PIO_STATUS_BLOCK IoStatusBlock, PVOID FsInformation, ULONG Length, FS_INFORMATION_CLASS FsInformationClass)
NTSTATUS(NTAPI * sNtQueryDirectoryFile)(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID FileInformation, ULONG Length, FILE_INFORMATION_CLASS FileInformationClass, BOOLEAN ReturnSingleEntry, PUNICODE_STRING FileName, BOOLEAN RestartScan)
NTSTATUS(NTAPI * sNtDeviceIoControlFile)(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG IoControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
NTSTATUS(NTAPI * sNtQuerySystemInformation)(UINT SystemInformationClass, PVOID SystemInformation, ULONG SystemInformationLength, PULONG ReturnLength)