13 #define NTAPI __stdcall
31 typedef LONG NTSTATUS;
32 typedef NTSTATUS *PNTSTATUS;
35 typedef CSHORT *PCSHORT;
38 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
39 * If they are zero terminated, Length does not include the terminating 0.
42 typedef struct _STRING {
46 } STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
48 typedef struct _CSTRING {
54 typedef struct _UNICODE_STRING {
55 USHORT Length; /* bytes */
56 USHORT MaximumLength; /* bytes */
58 } UNICODE_STRING,*PUNICODE_STRING;
64 #define OBJ_INHERIT 0x00000002L
65 #define OBJ_PERMANENT 0x00000010L
66 #define OBJ_EXCLUSIVE 0x00000020L
67 #define OBJ_CASE_INSENSITIVE 0x00000040L
68 #define OBJ_OPENIF 0x00000080L
69 #define OBJ_OPENLINK 0x00000100L
70 #define OBJ_KERNEL_HANDLE 0x00000200L
71 #define OBJ_VALID_ATTRIBUTES 0x000003F2L
73 typedef struct _OBJECT_ATTRIBUTES
76 PUNICODE_STRING ObjectName;
78 PVOID SecurityDescriptor; /* type SECURITY_DESCRIPTOR */
79 PVOID SecurityQualityOfService; /* type SECURITY_QUALITY_OF_SERVICE */
82 typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
84 #define InitializeObjectAttributes(p,n,a,r,s) \
85 { (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
86 (p)->RootDirectory = r; \
87 (p)->Attributes = a; \
88 (p)->ObjectName = n; \
89 (p)->SecurityDescriptor = s; \
90 (p)->SecurityQualityOfService = NULL; \