4 #pragma GCC system_header
7 /* TODO: some compilers support this */
8 #define RESTRICTED_POINTER
10 #define NTAPI __stdcall
11 #define OBJ_INHERIT 0x00000002
12 #define OBJ_PERMANENT 0x00000010
13 #define OBJ_EXCLUSIVE 0x00000020
14 #define OBJ_CASE_INSENSITIVE 0x00000040
15 #define OBJ_OPENIF 0x00000080
16 #define OBJ_OPENLINK 0x00000100
17 #define OBJ_KERNEL_HANDLE 0x00000200
18 #define OBJ_VALID_ATTRIBUTES (OBJ_KERNEL_HANDLE | OBJ_OPENLINK | \
19 OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_EXCLUSIVE | \
20 OBJ_PERMANENT | OBJ_INHERIT)
21 #define InitializeObjectAttributes(p,n,a,r,s) { \
22 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
23 (p)->RootDirectory = (r); \
24 (p)->Attributes = (a); \
25 (p)->ObjectName = (n); \
26 (p)->SecurityDescriptor = (s); \
27 (p)->SecurityQualityOfService = NULL; \
30 #define NT_SUCCESS(x) ((x)>=0)
31 #define STATUS_SUCCESS ((NTSTATUS)0)
33 #define NT_WARNING(x) ((ULONG)(x)>>30==2)
34 #define NT_ERROR(x) ((ULONG)(x)>>30==3)
35 #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
36 typedef LONG NTSTATUS
, *PNTSTATUS
;
37 typedef struct _UNICODE_STRING
{
41 } UNICODE_STRING
, *PUNICODE_STRING
;
42 typedef const UNICODE_STRING
* PCUNICODE_STRING
;
43 typedef struct _STRING
{
49 typedef STRING ANSI_STRING
;
50 typedef PSTRING PANSI_STRING
;
51 typedef STRING OEM_STRING
;
52 typedef PSTRING POEM_STRING
;
53 typedef LARGE_INTEGER PHYSICAL_ADDRESS
, *PPHYSICAL_ADDRESS
;
54 typedef enum _SECTION_INHERIT
{
58 typedef enum _NT_PRODUCT_TYPE
{
62 } NT_PRODUCT_TYPE
, *PNT_PRODUCT_TYPE
;
63 #if !defined(_NTSECAPI_H)
64 typedef struct _OBJECT_ATTRIBUTES
{
67 PUNICODE_STRING ObjectName
;
69 PVOID SecurityDescriptor
;
70 PVOID SecurityQualityOfService
;
71 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
74 #define RTL_CONSTANT_STRING(s) { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
75 #define TYPE_ALIGNMENT( t ) FIELD_OFFSET( struct { char x; t test; }, test )
79 #define MINSHORT 0x8000
80 #define MAXSHORT 0x7fff
81 #define MINLONG 0x80000000
82 #define MAXLONG 0x7fffffff
84 #define MAXUSHORT 0xffff
85 #define MAXULONG 0xffffffff