Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-03-13 14:22:51 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-03-13 14:22:51 +0300
commit75c7893797b0ddf33eb8c50f9e04034b465bdb4b (patch)
treec994a17eff69aca9ab382b57125f6b8cd5e1efa6 /winsup/cygwin/autoload.cc
parent57001a7f1021377af2f445d2965930ba85346d7c (diff)
* autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions.
Use for NT native functions throughout. * dtable.cc (handle_to_fn): Treate return value of NtQueryObject as NTSTATUS value.
Diffstat (limited to 'winsup/cygwin/autoload.cc')
-rw-r--r--winsup/cygwin/autoload.cc51
1 files changed, 27 insertions, 24 deletions
diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc
index 6b889a946..c6ce11317 100644
--- a/winsup/cygwin/autoload.cc
+++ b/winsup/cygwin/autoload.cc
@@ -378,30 +378,33 @@ LoadDLLfunc (NetUserGetGroups, 28, netapi32)
LoadDLLfunc (NetUserGetInfo, 16, netapi32)
LoadDLLfunc (NetWkstaUserGetInfo, 12, netapi32)
-LoadDLLfuncEx (NtClose, 4, ntdll, 1)
-LoadDLLfuncEx (NtCreateFile, 44, ntdll, 1)
-LoadDLLfuncEx (NtCreateSection, 28, ntdll, 1)
-LoadDLLfuncEx (NtCreateToken, 52, ntdll, 1)
-LoadDLLfuncEx (NtLockVirtualMemory, 16, ntdll, 1)
-LoadDLLfuncEx (NtMapViewOfSection, 40, ntdll, 1)
-LoadDLLfuncEx (NtOpenDirectoryObject, 12, ntdll, 1)
-LoadDLLfuncEx (NtOpenFile, 24, ntdll, 1)
-LoadDLLfuncEx (NtOpenSection, 12, ntdll, 1)
-LoadDLLfuncEx (NtQueryDirectoryObject, 28, ntdll, 1)
-LoadDLLfuncEx2 (NtQueryDirectoryFile, 44, ntdll, 1, 1)
-LoadDLLfuncEx2 (NtQueryInformationFile, 20, ntdll, 1, 1)
-LoadDLLfuncEx (NtQueryInformationProcess, 20, ntdll, 1)
-LoadDLLfuncEx2 (NtQueryObject, 20, ntdll, 1, 1)
-LoadDLLfuncEx (NtQuerySystemInformation, 16, ntdll, 1)
-LoadDLLfuncEx (NtQuerySecurityObject, 20, ntdll, 1)
-LoadDLLfuncEx (NtQueryVirtualMemory, 24, ntdll, 1)
-LoadDLLfuncEx (NtQueryVolumeInformationFile, 20, ntdll, 1)
-LoadDLLfuncEx (NtSetSecurityObject, 12, ntdll, 1)
-LoadDLLfuncEx (NtUnlockVirtualMemory, 16, ntdll, 1)
-LoadDLLfuncEx (NtUnmapViewOfSection, 8, ntdll, 1)
-LoadDLLfuncEx (RtlInitUnicodeString, 8, ntdll, 1)
-LoadDLLfuncEx (RtlNtStatusToDosError, 4, ntdll, 1)
-LoadDLLfuncEx (RtlIsDosDeviceName_U, 4, ntdll, 1)
+/* 0xc000007a == STATUS_PROCEDURE_NOT_FOUND */
+#define LoadDLLfuncNt(name, n, dllname) \
+ LoadDLLfuncEx2(name, n, dllname, 1, 0xc000007a)
+LoadDLLfuncNt (NtClose, 4, ntdll)
+LoadDLLfuncNt (NtCreateFile, 44, ntdll)
+LoadDLLfuncNt (NtCreateSection, 28, ntdll)
+LoadDLLfuncNt (NtCreateToken, 52, ntdll)
+LoadDLLfuncNt (NtLockVirtualMemory, 16, ntdll)
+LoadDLLfuncNt (NtMapViewOfSection, 40, ntdll)
+LoadDLLfuncNt (NtOpenDirectoryObject, 12, ntdll)
+LoadDLLfuncNt (NtOpenFile, 24, ntdll)
+LoadDLLfuncNt (NtOpenSection, 12, ntdll)
+LoadDLLfuncNt (NtQueryDirectoryObject, 28, ntdll)
+LoadDLLfuncNt (NtQueryDirectoryFile, 44, ntdll)
+LoadDLLfuncNt (NtQueryInformationFile, 20, ntdll)
+LoadDLLfuncNt (NtQueryInformationProcess, 20, ntdll)
+LoadDLLfuncNt (NtQueryObject, 20, ntdll)
+LoadDLLfuncNt (NtQuerySystemInformation, 16, ntdll)
+LoadDLLfuncNt (NtQuerySecurityObject, 20, ntdll)
+LoadDLLfuncNt (NtQueryVirtualMemory, 24, ntdll)
+LoadDLLfuncNt (NtQueryVolumeInformationFile, 20, ntdll)
+LoadDLLfuncNt (NtSetSecurityObject, 12, ntdll)
+LoadDLLfuncNt (NtUnlockVirtualMemory, 16, ntdll)
+LoadDLLfuncNt (NtUnmapViewOfSection, 8, ntdll)
+LoadDLLfuncNt (RtlInitUnicodeString, 8, ntdll)
+LoadDLLfuncNt (RtlIsDosDeviceName_U, 4, ntdll)
+LoadDLLfuncNt (RtlNtStatusToDosError, 4, ntdll)
LoadDLLfuncEx (EnumProcessModules, 16, psapi, 1)
LoadDLLfuncEx (GetModuleFileNameExA, 16, psapi, 1)