Removed unneeded inclusion of queue.h.
[wine] / include / ntdef.h
1 #ifndef __WINE_NTDEF_H
2 #define __WINE_NTDEF_H
3
4 #include "basetsd.h"
5 #include "windef.h"
6
7 #include "pshpack1.h"
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 #define NTAPI   __stdcall 
14
15 #ifndef IN
16 #define IN
17 #endif
18
19 #ifndef OUT
20 #define OUT
21 #endif
22
23 #ifndef OPTIONAL
24 #define OPTIONAL
25 #endif
26
27 #ifndef VOID
28 #define VOID void
29 #endif
30
31 typedef LONG NTSTATUS;
32 typedef NTSTATUS *PNTSTATUS;
33
34 typedef short CSHORT;
35 typedef CSHORT *PCSHORT;  
36
37
38 /* NT lowlevel Strings (handled by Rtl* functions in NTDLL)
39  * If they are zero terminated, Length does not include the terminating 0.
40  */
41
42 typedef struct _STRING {
43         USHORT  Length;
44         USHORT  MaximumLength;
45         PSTR    Buffer;
46 } STRING,*PSTRING,ANSI_STRING,*PANSI_STRING;
47
48 typedef struct _CSTRING {
49         USHORT  Length;
50         USHORT  MaximumLength;
51         PCSTR   Buffer;
52 } CSTRING,*PCSTRING;
53
54 typedef struct _UNICODE_STRING {
55         USHORT  Length;         /* bytes */
56         USHORT  MaximumLength;  /* bytes */
57         PWSTR   Buffer;
58 } UNICODE_STRING,*PUNICODE_STRING;
59
60 /*
61         Objects
62 */
63
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
72
73 typedef struct _OBJECT_ATTRIBUTES 
74 {   ULONG Length;
75     HANDLE RootDirectory;
76     PUNICODE_STRING ObjectName;
77     ULONG Attributes;
78     PVOID SecurityDescriptor;        /* type SECURITY_DESCRIPTOR */
79     PVOID SecurityQualityOfService;  /* type SECURITY_QUALITY_OF_SERVICE */
80 } OBJECT_ATTRIBUTES;
81
82 typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
83
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; \
91 }
92
93
94 #ifdef __cplusplus
95 }
96 #endif
97
98 #include "poppack.h"
99
100 #endif