2 * PROJECT: ReactOS Native Headers
3 * FILE: include/ndk/umtypes.h
4 * PURPOSE: Definitions needed for Native Headers if target is not Kernel-Mode.
5 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
10 #if !defined(_NTDEF_) && !defined(_NTDEF_H)
14 /* DEPENDENCIES **************************************************************/
17 #undef WIN32_NO_STATUS
20 /* CONSTANTS *****************************************************************/
22 /* NTAPI/NTOSAPI Define */
23 #define DECLSPEC_ADDRSAFE
24 #define NTAPI __stdcall
25 #define FASTCALL __fastcall
26 #if !defined(_NTSYSTEM_)
27 #define NTSYSAPI DECLSPEC_IMPORT
28 #define NTSYSCALLAPI DECLSPEC_IMPORT
31 #if defined(_NTDLLBUILD_)
34 #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
37 #if !defined(_M_CEE_PURE)
38 #define NTAPI_INLINE NTAPI
43 /* Native API Return Value Macros */
44 #define NT_SUCCESS(x) ((x)>=0)
45 #define NT_WARNING(x) ((ULONG)(x)>>30==2)
46 #define NT_ERROR(x) ((ULONG)(x)>>30==3)
51 #define MINSHORT 0x8000
52 #define MAXSHORT 0x7fff
53 #define MINLONG 0x80000000
54 #define MAXLONG 0x7fffffff
56 #define MAXUSHORT 0xffff
57 #define MAXULONG 0xffffffff
59 /* TYPES *********************************************************************/
61 /* Basic Types that aren't defined in User-Mode Headers */
62 typedef CONST
int CINT
;
63 typedef CONST
char *PCSZ
;
66 typedef CSHORT
*PCSHORT
;
67 typedef LARGE_INTEGER PHYSICAL_ADDRESS
, *PPHYSICAL_ADDRESS
;
68 typedef LONG KPRIORITY
;
69 typedef LONG NTSTATUS
, *PNTSTATUS
;
73 #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
74 typedef struct _UNICODE_STRING
79 } UNICODE_STRING
, *PUNICODE_STRING
;
80 typedef const UNICODE_STRING
* PCUNICODE_STRING
;
82 typedef struct _STRING
89 typedef struct _OBJECT_ATTRIBUTES
93 PUNICODE_STRING ObjectName
;
95 PVOID SecurityDescriptor
;
96 PVOID SecurityQualityOfService
;
97 } OBJECT_ATTRIBUTES
, *POBJECT_ATTRIBUTES
;
100 typedef STRING ANSI_STRING
;
101 typedef PSTRING PANSI_STRING
;
102 typedef STRING OEM_STRING
;
103 typedef PSTRING POEM_STRING
;
104 typedef CONST STRING
* PCOEM_STRING
;
105 typedef STRING CANSI_STRING
;
106 typedef PSTRING PCANSI_STRING
;