summaryrefslogtreecommitdiffstats
path: root/winsup/w32api/include/ntdef.h
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-10-01 00:55:42 +0000
committerCorinna Vinschen <corinna@vinschen.de>2000-10-01 00:55:42 +0000
commita5e8da40ebb7c6ab732dad31b8d8f1ab4afecd9d (patch)
tree78cf8a8c082ec5764b54469c189f9d11077e0102 /winsup/w32api/include/ntdef.h
parenta6b9fcde412f15583217acf60e7a665999ce0c02 (diff)
downloadcygnal-a5e8da40ebb7c6ab732dad31b8d8f1ab4afecd9d.tar.gz
cygnal-a5e8da40ebb7c6ab732dad31b8d8f1ab4afecd9d.tar.bz2
cygnal-a5e8da40ebb7c6ab732dad31b8d8f1ab4afecd9d.zip
* include/ntdef.h: New file.
Diffstat (limited to 'winsup/w32api/include/ntdef.h')
-rw-r--r--winsup/w32api/include/ntdef.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/winsup/w32api/include/ntdef.h b/winsup/w32api/include/ntdef.h
new file mode 100644
index 000000000..3b2674bd9
--- /dev/null
+++ b/winsup/w32api/include/ntdef.h
@@ -0,0 +1,44 @@
+#ifndef _NTDEF_H_
+#define _NTDEF_H_
+
+#define OBJ_INHERIT 2L
+#define OBJ_PERMANENT 16L
+#define OBJ_EXCLUSIVE 32L
+#define OBJ_CASE_INSENSITIVE 64L
+#define OBJ_OPENIF 128L
+#define OBJ_OPENLINK 256L
+#define OBJ_VALID_ATTRIBUTES 498L
+
+#define InitializeObjectAttributes(p,n,a,r,s) { \
+ (p)->Length = sizeof( OBJECT_ATTRIBUTES ); \
+ (p)->RootDirectory = r; \
+ (p)->Attributes = a; \
+ (p)->ObjectName = n; \
+ (p)->SecurityDescriptor = s; \
+ (p)->SecurityQualityOfService = NULL; \
+}
+
+#define STATUS_SUCCESS ((NTSTATUS)0)
+#define NT_SUCCESS(x) ((x)>=0)
+
+typedef LONG NTSTATUS, *PNTSTATUS;
+typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
+typedef struct _UNICODE_STRING {
+ USHORT Length;
+ USHORT MaximumLength;
+ PWSTR Buffer;
+} UNICODE_STRING, *PUNICODE_STRING;
+typedef enum _SECTION_INHERIT {
+ ViewShare = 1,
+ ViewUnmap = 2
+} SECTION_INHERIT;
+typedef struct _OBJECT_ATTRIBUTES {
+ ULONG Length;
+ HANDLE RootDirectory;
+ PUNICODE_STRING ObjectName;
+ ULONG Attributes;
+ PVOID SecurityDescriptor;
+ PVOID SecurityQualityOfService;
+} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
+
+#endif /* _NTDEF_H_ */