3 Copyright (c) Alex Ionescu. All rights reserved.
11 Type definitions for the basic native types.
15 Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
19 #if !defined(_NTDEF_) && !defined(_NTDEF_H)
22 #undef WIN32_NO_STATUS
23 #define NTOS_MODE_USER
33 // Compiler Definitions
37 #define FASTCALL _fastcall
42 #define FASTCALL NTAPI
45 #if !defined(_M_CEE_PURE)
46 #define NTAPI_INLINE NTAPI
51 #if !defined(_NTSYSTEM_)
52 #define NTSYSAPI DECLSPEC_IMPORT
53 #define NTSYSCALLAPI DECLSPEC_IMPORT
56 #if defined(_NTDLLBUILD_)
59 #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
64 // Native API Return Value Macros
66 #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
67 #define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1)
68 #define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2)
69 #define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3)
76 #define MINSHORT 0x8000
77 #define MAXSHORT 0x7fff
78 #define MINLONG 0x80000000
79 #define MAXLONG 0x7fffffff
81 #define MAXUSHORT 0xffff
82 #define MAXULONG 0xffffffff
85 // Basic Types that aren't defined in User-Mode Headers
87 typedef CONST
int CINT
;
88 typedef CONST
char *PCSZ
;
91 typedef CSHORT
*PCSHORT
;
92 typedef LARGE_INTEGER PHYSICAL_ADDRESS
, *PPHYSICAL_ADDRESS
;
93 typedef LONG KPRIORITY
;
94 typedef LONG NTSTATUS
, *PNTSTATUS
;
99 #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
101 typedef struct _UNICODE_STRING
104 USHORT MaximumLength
;
106 } UNICODE_STRING
, *PUNICODE_STRING
;
107 typedef const UNICODE_STRING
* PCUNICODE_STRING
;
109 typedef struct _STRING
112 USHORT MaximumLength
;
116 typedef struct _OBJECT_ATTRIBUTES
119 HANDLE RootDirectory
;
120 PUNICODE_STRING ObjectName
;
122 PVOID SecurityDescriptor
;
123 PVOID SecurityQualityOfService
;
124 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
127 typedef STRING ANSI_STRING
;
128 typedef PSTRING PANSI_STRING
;
129 typedef STRING OEM_STRING
;
130 typedef PSTRING POEM_STRING
;
131 typedef CONST STRING
* PCOEM_STRING
;
132 typedef STRING CANSI_STRING
;
133 typedef PSTRING PCANSI_STRING
;