ReactOS 0.4.15-dev-7788-g1ad9096
ntdef.template.h File Reference
#include <ctype.h>
#include <basetsd.h>
#include <guiddef.h>
#include <excpt.h>
#include <sdkddkver.h>
#include <specstrings.h>
#include <kernelspecs.h>
Include dependency graph for ntdef.template.h:

Go to the source code of this file.

Classes

struct  _QUAD
 
struct  _STRING
 
struct  _STRING32
 
struct  _STRING64
 
struct  _CSTRING
 
struct  _UNICODE_STRING
 
struct  _OBJECT_ATTRIBUTES
 
struct  _OBJECT_ATTRIBUTES32
 
struct  _OBJECT_ATTRIBUTES64
 
struct  _RTL_BALANCED_NODE
 

Macros

#define STRICT   1
 
#define IN
 
#define OUT
 
#define OPTIONAL
 
#define NOTHING
 
#define CRITICAL
 
#define CONST   const
 
#define FALSE   0
 
#define TRUE   1
 
#define NULL   ((void *)0)
 
#define NULL64   ((void * POINTER_64)0)
 
#define ARGUMENT_PRESENT(ArgumentPointer)    ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
 
#define FASTCALL
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 
#define max(a, b)   (((a) > (b)) ? (a) : (b))
 
#define BASETYPES
 
#define __SECSTATUS_DEFINED__
 
#define TIME   LARGE_INTEGER
 
#define _TIME   _LARGE_INTEGER
 
#define PTIME   PLARGE_INTEGER
 
#define LowTime   LowPart
 
#define HighTime   HighPart
 
#define _RTL_CONSTANT_STRING_remove_const_macro(s)   (s)
 
#define RTL_CONSTANT_STRING(s)
 
#define DECLARE_UNICODE_STRING_SIZE(_var, _size)
 
#define DECLARE_CONST_UNICODE_STRING(_var, _string)
 
#define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str)    extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str)
 
#define OBJ_HANDLE_TAGBITS   0x00000003L
 
#define OBJ_INHERIT   0x00000002L
 
#define OBJ_PERMANENT   0x00000010L
 
#define OBJ_EXCLUSIVE   0x00000020L
 
#define OBJ_CASE_INSENSITIVE   0x00000040L
 
#define OBJ_OPENIF   0x00000080L
 
#define OBJ_OPENLINK   0x00000100L
 
#define OBJ_KERNEL_HANDLE   0x00000200L
 
#define OBJ_FORCE_ACCESS_CHECK   0x00000400L
 
#define OBJ_VALID_ATTRIBUTES   0x000007F2L
 
#define InitializeObjectAttributes(p, n, a, r, s)
 
#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
 
#define RTL_INIT_OBJECT_ATTRIBUTES(n, a)    RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
 
#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK   3
 
#define RTL_BALANCED_NODE_GET_PARENT_POINTER(Node)
 

Typedefs

typedef NTSTATUSPNTSTATUS
 
typedef long SECURITY_STATUS
 
typedef LARGE_INTEGER PHYSICAL_ADDRESS
 
typedef LARGE_INTEGERPPHYSICAL_ADDRESS
 
typedef struct _QUAD QUAD
 
typedef struct _QUADPQUAD
 
typedef struct _QUAD UQUAD
 
typedef struct _QUADPUQUAD
 
typedef struct _STRING STRING
 
typedef struct _STRINGPSTRING
 
typedef struct _STRING ANSI_STRING
 
typedef struct _STRINGPANSI_STRING
 
typedef struct _STRING OEM_STRING
 
typedef struct _STRINGPOEM_STRING
 
typedef CONST STRINGPCOEM_STRING
 
typedef STRING CANSI_STRING
 
typedef PSTRING PCANSI_STRING
 
typedef struct _STRING32 STRING32
 
typedef struct _STRING32PSTRING32
 
typedef struct _STRING32 UNICODE_STRING32
 
typedef struct _STRING32PUNICODE_STRING32
 
typedef struct _STRING32 ANSI_STRING32
 
typedef struct _STRING32PANSI_STRING32
 
typedef struct _STRING64 STRING64
 
typedef struct _STRING64PSTRING64
 
typedef struct _STRING64 UNICODE_STRING64
 
typedef struct _STRING64PUNICODE_STRING64
 
typedef struct _STRING64 ANSI_STRING64
 
typedef struct _STRING64PANSI_STRING64
 
typedef struct _CSTRING CSTRING
 
typedef struct _CSTRINGPCSTRING
 
typedef struct _UNICODE_STRING UNICODE_STRING
 
typedef struct _UNICODE_STRINGPUNICODE_STRING
 
typedef const UNICODE_STRINGPCUNICODE_STRING
 
typedef USHORT RTL_STRING_LENGTH_TYPE
 
typedef struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
 
typedef struct _OBJECT_ATTRIBUTESPOBJECT_ATTRIBUTES
 
typedef CONST OBJECT_ATTRIBUTESPCOBJECT_ATTRIBUTES
 
typedef struct _OBJECT_ATTRIBUTES32 OBJECT_ATTRIBUTES32
 
typedef struct _OBJECT_ATTRIBUTES32POBJECT_ATTRIBUTES32
 
typedef CONST OBJECT_ATTRIBUTES32PCOBJECT_ATTRIBUTES32
 
typedef struct _OBJECT_ATTRIBUTES64 OBJECT_ATTRIBUTES64
 
typedef struct _OBJECT_ATTRIBUTES64POBJECT_ATTRIBUTES64
 
typedef CONST OBJECT_ATTRIBUTES64PCOBJECT_ATTRIBUTES64
 
typedef struct _RTL_BALANCED_NODE RTL_BALANCED_NODE
 
typedef struct _RTL_BALANCED_NODEPRTL_BALANCED_NODE
 
typedef enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
 
typedef enum _NT_PRODUCT_TYPEPNT_PRODUCT_TYPE
 
typedef enum _EVENT_TYPE EVENT_TYPE
 
typedef enum _TIMER_TYPE TIMER_TYPE
 
typedef enum _WAIT_TYPE WAIT_TYPE
 

Enumerations

enum  _NT_PRODUCT_TYPE {
  NtProductWinNt = 1 , NtProductLanManNt , NtProductServer , NtProductWinNt = 1 ,
  NtProductLanManNt , NtProductServer
}
 
enum  _EVENT_TYPE { NotificationEvent , SynchronizationEvent }
 
enum  _TIMER_TYPE { NotificationTimer , SynchronizationTimer }
 
enum  _WAIT_TYPE { WaitAll , WaitAny }
 

Functions

 $if (0) $endif() $define(_NTDEF_) $define(ULONG
 
char _RTL_CONSTANT_STRING_type_check (const void *s)
 
FORCEINLINE VOID ListEntry32To64 (_In_ PLIST_ENTRY32 ListEntry32, _Out_ PLIST_ENTRY64 ListEntry64)
 
FORCEINLINE VOID ListEntry64To32 (_In_ PLIST_ENTRY64 ListEntry64, _Out_ PLIST_ENTRY32 ListEntry32)
 

Macro Definition Documentation

◆ __SECSTATUS_DEFINED__

#define __SECSTATUS_DEFINED__

Definition at line 125 of file ntdef.template.h.

◆ _RTL_CONSTANT_STRING_remove_const_macro

#define _RTL_CONSTANT_STRING_remove_const_macro (   s)    (s)

Definition at line 218 of file ntdef.template.h.

◆ _TIME

#define _TIME   _LARGE_INTEGER

Definition at line 132 of file ntdef.template.h.

◆ ARGUMENT_PRESENT

#define ARGUMENT_PRESENT (   ArgumentPointer)     ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)

◆ BASETYPES

#define BASETYPES

◆ CONST

#define CONST   const

◆ CRITICAL

#define CRITICAL

◆ DECLARE_CONST_UNICODE_STRING

#define DECLARE_CONST_UNICODE_STRING (   _var,
  _string 
)
Value:
const WCHAR _var##_buffer[] = _string; \
const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer }
WCHAR * PWCH
Definition: ntbasedef.h:410
__wchar_t WCHAR
Definition: xmlstorage.h:180

Definition at line 243 of file ntdef.template.h.

◆ DECLARE_GLOBAL_CONST_UNICODE_STRING

#define DECLARE_GLOBAL_CONST_UNICODE_STRING (   _var,
  _str 
)     extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str)

Definition at line 248 of file ntdef.template.h.

◆ DECLARE_UNICODE_STRING_SIZE

#define DECLARE_UNICODE_STRING_SIZE (   _var,
  _size 
)
Value:
WCHAR _var ## _buffer[_size]; \
UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer }

Definition at line 239 of file ntdef.template.h.

◆ FALSE

#define FALSE   0

◆ FASTCALL

#define FASTCALL

◆ HighTime

#define HighTime   HighPart

Definition at line 135 of file ntdef.template.h.

◆ IN

#define IN

◆ InitializeObjectAttributes

#define InitializeObjectAttributes (   p,
  n,
  a,
  r,
  s 
)
Value:
{ \
(p)->Length = sizeof(OBJECT_ATTRIBUTES); \
(p)->RootDirectory = (r); \
(p)->ObjectName = (n); \
(p)->Attributes = (a); \
(p)->SecurityQualityOfService = NULL; \
}
WCHAR RootDirectory[MAX_PATH]
Definition: format.c:74
GLdouble s
Definition: gl.h:2039
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble n
Definition: glext.h:7729
GLfloat GLfloat p
Definition: glext.h:8902
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define NULL
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
_In_ PVOID _Out_opt_ PULONG_PTR _Outptr_opt_ PCUNICODE_STRING * ObjectName
Definition: cmfuncs.h:64

Definition at line 296 of file ntdef.template.h.

◆ LowTime

#define LowTime   LowPart

Definition at line 134 of file ntdef.template.h.

◆ max

#define max (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

◆ min

#define min (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

◆ NOTHING

#define NOTHING

◆ NULL

#define NULL   ((void *)0)

◆ NULL64

#define NULL64   ((void * POINTER_64)0)

◆ OBJ_CASE_INSENSITIVE

#define OBJ_CASE_INSENSITIVE   0x00000040L

Definition at line 288 of file ntdef.template.h.

◆ OBJ_EXCLUSIVE

#define OBJ_EXCLUSIVE   0x00000020L

Definition at line 287 of file ntdef.template.h.

◆ OBJ_FORCE_ACCESS_CHECK

#define OBJ_FORCE_ACCESS_CHECK   0x00000400L

Definition at line 292 of file ntdef.template.h.

◆ OBJ_HANDLE_TAGBITS

#define OBJ_HANDLE_TAGBITS   0x00000003L

Definition at line 282 of file ntdef.template.h.

◆ OBJ_INHERIT

#define OBJ_INHERIT   0x00000002L

Definition at line 285 of file ntdef.template.h.

◆ OBJ_KERNEL_HANDLE

#define OBJ_KERNEL_HANDLE   0x00000200L

Definition at line 291 of file ntdef.template.h.

◆ OBJ_OPENIF

#define OBJ_OPENIF   0x00000080L

Definition at line 289 of file ntdef.template.h.

◆ OBJ_OPENLINK

#define OBJ_OPENLINK   0x00000100L

Definition at line 290 of file ntdef.template.h.

◆ OBJ_PERMANENT

#define OBJ_PERMANENT   0x00000010L

Definition at line 286 of file ntdef.template.h.

◆ OBJ_VALID_ATTRIBUTES

#define OBJ_VALID_ATTRIBUTES   0x000007F2L

Definition at line 293 of file ntdef.template.h.

◆ OPTIONAL

◆ OUT

#define OUT

◆ PTIME

#define PTIME   PLARGE_INTEGER

Definition at line 133 of file ntdef.template.h.

◆ RTL_BALANCED_NODE_GET_PARENT_POINTER

#define RTL_BALANCED_NODE_GET_PARENT_POINTER (   Node)
Value:
((PRTL_BALANCED_NODE)((Node)->ParentValue & \
~RTL_BALANCED_NODE_RESERVED_PARENT_MASK))
struct _RTL_BALANCED_NODE * PRTL_BALANCED_NODE
Definition: dlist.c:348

Definition at line 344 of file ntdef.template.h.

◆ RTL_BALANCED_NODE_RESERVED_PARENT_MASK

#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK   3

Definition at line 343 of file ntdef.template.h.

◆ RTL_CONSTANT_OBJECT_ATTRIBUTES

#define RTL_CONSTANT_OBJECT_ATTRIBUTES (   n,
  a 
)
Value:
{ \
sizeof(OBJECT_ATTRIBUTES), \
NULL, \
RTL_CONST_CAST(PUNICODE_STRING)(n), \
a, \
NULL, \
NULL \
}

Definition at line 305 of file ntdef.template.h.

◆ RTL_CONSTANT_STRING

#define RTL_CONSTANT_STRING (   s)
Value:
{ \
sizeof(s)-sizeof((s)[0]), \
sizeof(s) / (sizeof(_RTL_CONSTANT_STRING_type_check(s))), \
_RTL_CONSTANT_STRING_remove_const_macro(s) }
char _RTL_CONSTANT_STRING_type_check(const void *s)

Definition at line 221 of file ntdef.template.h.

◆ RTL_INIT_OBJECT_ATTRIBUTES

#define RTL_INIT_OBJECT_ATTRIBUTES (   n,
  a 
)     RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)

Definition at line 314 of file ntdef.template.h.

◆ STRICT

#define STRICT   1

◆ TIME

Definition at line 131 of file ntdef.template.h.

◆ TRUE

#define TRUE   1

Typedef Documentation

◆ ANSI_STRING

◆ ANSI_STRING32

◆ ANSI_STRING64

◆ CANSI_STRING

Definition at line 171 of file ntdef.template.h.

◆ CSTRING

◆ EVENT_TYPE

◆ NT_PRODUCT_TYPE

◆ OBJECT_ATTRIBUTES

◆ OBJECT_ATTRIBUTES32

◆ OBJECT_ATTRIBUTES64

◆ OEM_STRING

◆ PANSI_STRING

◆ PANSI_STRING32

◆ PANSI_STRING64

◆ PCANSI_STRING

Definition at line 172 of file ntdef.template.h.

◆ PCOBJECT_ATTRIBUTES

Definition at line 260 of file ntdef.template.h.

◆ PCOBJECT_ATTRIBUTES32

Definition at line 270 of file ntdef.template.h.

◆ PCOBJECT_ATTRIBUTES64

Definition at line 280 of file ntdef.template.h.

◆ PCOEM_STRING

Definition at line 170 of file ntdef.template.h.

◆ PCSTRING

◆ PCUNICODE_STRING

Definition at line 205 of file ntdef.template.h.

◆ PHYSICAL_ADDRESS

Definition at line 129 of file ntdef.template.h.

◆ PNT_PRODUCT_TYPE

◆ PNTSTATUS

typedef NTSTATUS* PNTSTATUS

Definition at line 121 of file ntdef.template.h.

◆ POBJECT_ATTRIBUTES

◆ POBJECT_ATTRIBUTES32

◆ POBJECT_ATTRIBUTES64

◆ POEM_STRING

◆ PPHYSICAL_ADDRESS

Definition at line 129 of file ntdef.template.h.

◆ PQUAD

typedef struct _QUAD * PQUAD

◆ PRTL_BALANCED_NODE

◆ PSTRING

typedef struct _STRING * PSTRING

◆ PSTRING32

◆ PSTRING64

◆ PUNICODE_STRING

◆ PUNICODE_STRING32

◆ PUNICODE_STRING64

◆ PUQUAD

typedef struct _QUAD * PUQUAD

◆ QUAD

typedef struct _QUAD QUAD

◆ RTL_BALANCED_NODE

◆ RTL_STRING_LENGTH_TYPE

Definition at line 207 of file ntdef.template.h.

◆ SECURITY_STATUS

Definition at line 124 of file ntdef.template.h.

◆ STRING

◆ STRING32

◆ STRING64

◆ TIMER_TYPE

◆ UNICODE_STRING

◆ UNICODE_STRING32

◆ UNICODE_STRING64

◆ UQUAD

typedef struct _QUAD UQUAD

◆ WAIT_TYPE

Enumeration Type Documentation

◆ _EVENT_TYPE

Enumerator
NotificationEvent 
SynchronizationEvent 

Definition at line 355 of file ntdef.template.h.

355 {
358} EVENT_TYPE;
@ NotificationEvent
@ SynchronizationEvent
enum _EVENT_TYPE EVENT_TYPE

◆ _NT_PRODUCT_TYPE

Enumerator
NtProductWinNt 
NtProductLanManNt 
NtProductServer 
NtProductWinNt 
NtProductLanManNt 
NtProductServer 

Definition at line 349 of file ntdef.template.h.

349 {
350 NtProductWinNt = 1,
enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
@ NtProductWinNt
@ NtProductLanManNt
@ NtProductServer

◆ _TIMER_TYPE

Enumerator
NotificationTimer 
SynchronizationTimer 

Definition at line 360 of file ntdef.template.h.

360 {
363} TIMER_TYPE;
enum _TIMER_TYPE TIMER_TYPE
@ SynchronizationTimer
@ NotificationTimer

◆ _WAIT_TYPE

Enumerator
WaitAll 
WaitAny 

Definition at line 365 of file ntdef.template.h.

365 {
366 WaitAll,
367 WaitAny
368} WAIT_TYPE;
@ WaitAll
@ WaitAny
enum _WAIT_TYPE WAIT_TYPE

Function Documentation

◆ $if()

$if ( )

◆ _RTL_CONSTANT_STRING_type_check()

char _RTL_CONSTANT_STRING_type_check ( const void s)

◆ ListEntry32To64()

FORCEINLINE VOID ListEntry32To64 ( _In_ PLIST_ENTRY32  ListEntry32,
_Out_ PLIST_ENTRY64  ListEntry64 
)

Definition at line 373 of file ntdef.template.h.

376{
377 ListEntry64->Flink = ListEntry32->Flink;
378 ListEntry64->Blink = ListEntry32->Blink;
379}

◆ ListEntry64To32()

FORCEINLINE VOID ListEntry64To32 ( _In_ PLIST_ENTRY64  ListEntry64,
_Out_ PLIST_ENTRY32  ListEntry32 
)

Definition at line 383 of file ntdef.template.h.

386{
387 /* ASSERT without ASSERT or intrinsics ... */
388 if (((ListEntry64->Flink >> 32) != 0) ||
389 ((ListEntry64->Blink >> 32) != 0))
390 {
391 (VOID)*(volatile LONG*)(LONG_PTR)-1;
392 }
393 ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF;
394 ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF;
395}
#define VOID
Definition: acefi.h:82
long LONG
Definition: pedump.c:60
#define LONG_PTR
Definition: treelist.c:79