ReactOS 0.4.16-dev-282-g4d0a26d
typedefs.h File Reference
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#include <stdint.h>
Include dependency graph for typedefs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RTL_BITMAP
 
struct  _RTL_BITMAP_RUN
 
union  _LARGE_INTEGER
 
struct  _LIST_ENTRY
 
struct  _ANSI_STRING
 
struct  _UNICODE_STRING
 

Macros

#define __fastcall   __attribute__((fastcall))
 
#define __cdecl   __attribute__((cdecl))
 
#define __stdcall   __attribute__((stdcall))
 
#define UNIMPLEMENTED   { printf("%s unimplemented\n", __FUNCTION__); exit(1); }
 
#define UNIMPLEMENTED_ONCE   { printf("%s unimplemented\n", __FUNCTION__); exit(1); }
 
#define ASSERT(x)   assert(x)
 
#define ASSERTMSG(m, x)   assert(x)
 
#define DPRINT   if (0) printf
 
#define DPRINT1   printf
 
#define NTAPI
 
#define WINAPI
 
#define IN
 
#define OUT
 
#define OPTIONAL
 
#define FALSE   0
 
#define TRUE   1
 
#define ANYSIZE_ARRAY   1
 
#define MAXUSHORT   USHRT_MAX
 
#define LOBYTE(w)   ((BYTE)(w))
 
#define HIBYTE(w)   ((BYTE)(((WORD)(w)>>8)&0xFF))
 
#define LOWORD(l)   ((WORD)((DWORD_PTR)(l)))
 
#define HIWORD(l)   ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
 
#define MAKEWORD(a, b)   ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
 
#define MAKELONG(a, b)   ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
 
#define MAXULONG   0xFFFFFFFF
 
#define NT_SUCCESS(x)   ((x)>=0)
 
#define FIELD_OFFSET(t, f)   ((LONG)(LONG_PTR)&(((t*) 0)->f))
 
#define RTL_CONSTANT_STRING(s)   { sizeof(s)-sizeof((s)[0]), sizeof(s), s }
 
#define CONTAINING_RECORD(address, type, field)   ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
 
#define RtlZeroMemory(Destination, Length)   memset(Destination, 0, Length)
 
#define RtlCopyMemory(Destination, Source, Length)   memcpy(Destination, Source, Length)
 
#define RtlMoveMemory(Destination, Source, Length)   memmove(Destination, Source, Length)
 
#define MAKELANGID(p, s)   ((((WORD)(s))<<10)|(WORD)(p))
 
#define PRIMARYLANGID(l)   ((WORD)(l)&0x3ff)
 
#define SUBLANGID(l)   ((WORD)(l)>>10)
 
#define SUBLANG_NEUTRAL   0x00
 
#define __INTERNAL_DEBUG
 
#define RTL_H
 

Typedefs

typedef void VOID
 
typedef voidPVOID
 
typedef voidLPVOID
 
typedef char CHAR
 
typedef char CCHAR
 
typedef charPCHAR
 
typedef charPSTR
 
typedef charLPSTR
 
typedef const charPCSTR
 
typedef const charLPCSTR
 
typedef unsigned char UCHAR
 
typedef unsigned charPUCHAR
 
typedef unsigned char BYTE
 
typedef unsigned charLPBYTE
 
typedef unsigned char BOOLEAN
 
typedef unsigned charPBOOLEAN
 
typedef uint8_t UINT8
 
typedef int16_t SHORT
 
typedef int16_tPSHORT
 
typedef uint16_t USHORT
 
typedef uint16_tPUSHORT
 
typedef uint16_t WORD
 
typedef uint16_tPWORD
 
typedef uint16_tLPWORD
 
typedef uint16_t WCHAR
 
typedef uint16_tPWCHAR
 
typedef uint16_tPWSTR
 
typedef uint16_tLPWSTR
 
typedef uint16_t UINT16
 
typedef const uint16_tPCWSTR
 
typedef const uint16_tLPCWSTR
 
typedef int32_t INT
 
typedef int32_t LONG
 
typedef int32_tPLONG
 
typedef int32_tLPLONG
 
typedef int32_t BOOL
 
typedef int32_t WINBOOL
 
typedef int32_t INT32
 
typedef uint32_t UINT
 
typedef uint32_tPUINT
 
typedef uint32_tLPUINT
 
typedef uint32_t ULONG
 
typedef uint32_tPULONG
 
typedef uint32_t DWORD
 
typedef uint32_tPDWORD
 
typedef uint32_tLPDWORD
 
typedef uint32_t UINT32
 
typedef int32_t LONG_PTR
 
typedef int32_tPLONG_PTR
 
typedef int32_t INT_PTR
 
typedef int32_tPINT_PTR
 
typedef uint32_t ULONG_PTR
 
typedef uint32_t DWORD_PTR
 
typedef uint32_tPULONG_PTR
 
typedef uint32_t UINT_PTR
 
typedef uint32_tPUINT_PTR
 
typedef uint64_t ULONG64
 
typedef uint64_t DWORD64
 
typedef uint64_tPDWORD64
 
typedef uint64_t UINT64
 
typedef uint64_t ULONGLONG
 
typedef int64_t LONGLONG
 
typedef int64_t LONG64
 
typedef int64_t INT64
 
typedef float FLOAT
 
typedef double DOUBLE
 
typedef PVOID HANDLE
 
typedef HANDLE HKEY
 
typedef HANDLEPHKEY
 
typedef HANDLE HMODULE
 
typedef HANDLE HINSTANCE
 
typedef INT NTSTATUS
 
typedef INT POOL_TYPE
 
typedef LONG HRESULT =NULL
 
typedef ULONG_PTR SIZE_T
 
typedef ULONG_PTRPSIZE_T
 
typedef WORD LANGID
 
typedef struct _RTL_BITMAP RTL_BITMAP
 
typedef struct _RTL_BITMAPPRTL_BITMAP
 
typedef struct _RTL_BITMAP_RUN RTL_BITMAP_RUN
 
typedef struct _RTL_BITMAP_RUNPRTL_BITMAP_RUN
 
typedef union _LARGE_INTEGER LARGE_INTEGER
 
typedef union _LARGE_INTEGERPLARGE_INTEGER
 
typedef struct _LIST_ENTRY LIST_ENTRY
 
typedef struct _LIST_ENTRYPLIST_ENTRY
 
typedef struct _ANSI_STRING ANSI_STRING
 
typedef struct _ANSI_STRINGPANSI_STRING
 
typedef struct _UNICODE_STRING UNICODE_STRING
 
typedef struct _UNICODE_STRINGPUNICODE_STRING
 
typedef const UNICODE_STRINGPCUNICODE_STRING
 

Functions

static __inline VOID InitializeListHead (IN PLIST_ENTRY ListHead)
 
static __inline VOID InsertHeadList (IN PLIST_ENTRY ListHead, IN PLIST_ENTRY Entry)
 
static __inline VOID InsertTailList (IN PLIST_ENTRY ListHead, IN PLIST_ENTRY Entry)
 
static __inline BOOLEAN IsListEmpty (IN const LIST_ENTRY *ListHead)
 
static __inline BOOLEAN RemoveEntryList (IN PLIST_ENTRY Entry)
 
static __inline PLIST_ENTRY RemoveHeadList (IN PLIST_ENTRY ListHead)
 
static __inline PLIST_ENTRY RemoveTailList (IN PLIST_ENTRY ListHead)
 

Macro Definition Documentation

◆ __cdecl

#define __cdecl   __attribute__((cdecl))

Definition at line 22 of file typedefs.h.

◆ __fastcall

#define __fastcall   __attribute__((fastcall))

Definition at line 19 of file typedefs.h.

◆ __INTERNAL_DEBUG

#define __INTERNAL_DEBUG

Definition at line 272 of file typedefs.h.

◆ __stdcall

◆ ANYSIZE_ARRAY

#define ANYSIZE_ARRAY   1

Definition at line 46 of file typedefs.h.

◆ ASSERT

#define ASSERT (   x)    assert(x)

Definition at line 31 of file typedefs.h.

◆ ASSERTMSG

#define ASSERTMSG (   m,
  x 
)    assert(x)

Definition at line 32 of file typedefs.h.

◆ CONTAINING_RECORD

#define CONTAINING_RECORD (   address,
  type,
  field 
)    ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))

Definition at line 260 of file typedefs.h.

◆ DPRINT

#define DPRINT   if (0) printf

Definition at line 33 of file typedefs.h.

◆ DPRINT1

#define DPRINT1   printf

Definition at line 34 of file typedefs.h.

◆ FALSE

#define FALSE   0

Definition at line 43 of file typedefs.h.

◆ FIELD_OFFSET

#define FIELD_OFFSET (   t,
  f 
)    ((LONG)(LONG_PTR)&(((t*) 0)->f))

Definition at line 255 of file typedefs.h.

◆ HIBYTE

#define HIBYTE (   w)    ((BYTE)(((WORD)(w)>>8)&0xFF))

Definition at line 245 of file typedefs.h.

◆ HIWORD

#define HIWORD (   l)    ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))

Definition at line 247 of file typedefs.h.

◆ IN

#define IN

Definition at line 39 of file typedefs.h.

◆ LOBYTE

#define LOBYTE (   w)    ((BYTE)(w))

Definition at line 244 of file typedefs.h.

◆ LOWORD

#define LOWORD (   l)    ((WORD)((DWORD_PTR)(l)))

Definition at line 246 of file typedefs.h.

◆ MAKELANGID

#define MAKELANGID (   p,
  s 
)    ((((WORD)(s))<<10)|(WORD)(p))

Definition at line 266 of file typedefs.h.

◆ MAKELONG

#define MAKELONG (   a,
  b 
)    ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))

Definition at line 249 of file typedefs.h.

◆ MAKEWORD

#define MAKEWORD (   a,
  b 
)    ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))

Definition at line 248 of file typedefs.h.

◆ MAXULONG

#define MAXULONG   0xFFFFFFFF

Definition at line 251 of file typedefs.h.

◆ MAXUSHORT

#define MAXUSHORT   USHRT_MAX

Definition at line 83 of file typedefs.h.

◆ NT_SUCCESS

#define NT_SUCCESS (   x)    ((x)>=0)

Definition at line 253 of file typedefs.h.

◆ NTAPI

#define NTAPI

Definition at line 36 of file typedefs.h.

◆ OPTIONAL

◆ OUT

#define OUT

Definition at line 40 of file typedefs.h.

◆ PRIMARYLANGID

#define PRIMARYLANGID (   l)    ((WORD)(l)&0x3ff)

Definition at line 267 of file typedefs.h.

◆ RTL_CONSTANT_STRING

#define RTL_CONSTANT_STRING (   s)    { sizeof(s)-sizeof((s)[0]), sizeof(s), s }

Definition at line 259 of file typedefs.h.

◆ RTL_H

#define RTL_H

Definition at line 273 of file typedefs.h.

◆ RtlCopyMemory

#define RtlCopyMemory (   Destination,
  Source,
  Length 
)    memcpy(Destination, Source, Length)

◆ RtlMoveMemory

#define RtlMoveMemory (   Destination,
  Source,
  Length 
)    memmove(Destination, Source, Length)

Definition at line 264 of file typedefs.h.

◆ RtlZeroMemory

#define RtlZeroMemory (   Destination,
  Length 
)    memset(Destination, 0, Length)

Definition at line 262 of file typedefs.h.

◆ SUBLANG_NEUTRAL

#define SUBLANG_NEUTRAL   0x00

Definition at line 269 of file typedefs.h.

◆ SUBLANGID

#define SUBLANGID (   l)    ((WORD)(l)>>10)

Definition at line 268 of file typedefs.h.

◆ TRUE

#define TRUE   1

Definition at line 44 of file typedefs.h.

◆ UNIMPLEMENTED

#define UNIMPLEMENTED   { printf("%s unimplemented\n", __FUNCTION__); exit(1); }

Definition at line 29 of file typedefs.h.

◆ UNIMPLEMENTED_ONCE

#define UNIMPLEMENTED_ONCE   { printf("%s unimplemented\n", __FUNCTION__); exit(1); }

Definition at line 30 of file typedefs.h.

◆ WINAPI

#define WINAPI

Definition at line 37 of file typedefs.h.

Typedef Documentation

◆ ANSI_STRING

◆ BOOL

typedef int32_t BOOL

Definition at line 58 of file typedefs.h.

◆ BOOLEAN

Definition at line 53 of file typedefs.h.

◆ BYTE

typedef unsigned char BYTE

Definition at line 53 of file typedefs.h.

◆ CCHAR

typedef char CCHAR

Definition at line 51 of file typedefs.h.

◆ CHAR

typedef char CHAR

Definition at line 51 of file typedefs.h.

◆ DOUBLE

typedef double DOUBLE

Definition at line 70 of file typedefs.h.

◆ DWORD

typedef uint32_t DWORD

Definition at line 59 of file typedefs.h.

◆ DWORD64

typedef uint64_t DWORD64

Definition at line 67 of file typedefs.h.

◆ DWORD_PTR

Definition at line 65 of file typedefs.h.

◆ FLOAT

typedef float FLOAT

Definition at line 69 of file typedefs.h.

◆ HANDLE

typedef HANDLE

Definition at line 73 of file typedefs.h.

◆ HINSTANCE

static HINSTANCE

Definition at line 77 of file typedefs.h.

◆ HKEY

typedef HANDLE HKEY

Definition at line 75 of file typedefs.h.

◆ HMODULE

typedef HANDLE HMODULE

Definition at line 77 of file typedefs.h.

◆ HRESULT

typedef HRESULT =NULL

Definition at line 79 of file typedefs.h.

◆ INT

typedef INT

Definition at line 58 of file typedefs.h.

◆ INT32

typedef int32_t INT32

Definition at line 58 of file typedefs.h.

◆ INT64

typedef int64_t INT64

Definition at line 68 of file typedefs.h.

◆ INT_PTR

typedef int32_t INT_PTR

Definition at line 64 of file typedefs.h.

◆ LANGID

typedef WORD LANGID

Definition at line 81 of file typedefs.h.

◆ LARGE_INTEGER

◆ LIST_ENTRY

◆ LONG

typedef int32_t LONG

Definition at line 58 of file typedefs.h.

◆ LONG64

typedef int64_t LONG64

Definition at line 68 of file typedefs.h.

◆ LONG_PTR

typedef int32_t LONG_PTR

Definition at line 64 of file typedefs.h.

◆ LONGLONG

static LONGLONG

Definition at line 68 of file typedefs.h.

◆ LPBYTE

static LPBYTE

Definition at line 53 of file typedefs.h.

◆ LPCSTR

typedef const char * LPCSTR

Definition at line 52 of file typedefs.h.

◆ LPCWSTR

typedef const uint16_t * LPCWSTR

Definition at line 57 of file typedefs.h.

◆ LPDWORD

typedef uint32_t * LPDWORD

Definition at line 59 of file typedefs.h.

◆ LPLONG

typedef int32_t * LPLONG

Definition at line 58 of file typedefs.h.

◆ LPSTR

typedef char * LPSTR

Definition at line 51 of file typedefs.h.

◆ LPUINT

typedef uint32_t * LPUINT

Definition at line 59 of file typedefs.h.

◆ LPVOID

typedef void * LPVOID

Definition at line 50 of file typedefs.h.

◆ LPWORD

typedef uint16_t * LPWORD

Definition at line 56 of file typedefs.h.

◆ LPWSTR

typedef uint16_t * LPWSTR

Definition at line 56 of file typedefs.h.

◆ NTSTATUS

typedef INT NTSTATUS

Definition at line 78 of file typedefs.h.

◆ PANSI_STRING

◆ PBOOLEAN

typedef PBOOLEAN

Definition at line 53 of file typedefs.h.

◆ PCHAR

typedef char * PCHAR

Definition at line 51 of file typedefs.h.

◆ PCSTR

static PCSTR

Definition at line 52 of file typedefs.h.

◆ PCUNICODE_STRING

Definition at line 240 of file typedefs.h.

◆ PCWSTR

static PCWSTR

Definition at line 57 of file typedefs.h.

◆ PDWORD

typedef uint32_t * PDWORD

Definition at line 59 of file typedefs.h.

◆ PDWORD64

typedef uint64_t * PDWORD64

Definition at line 67 of file typedefs.h.

◆ PHKEY

typedef HANDLE * PHKEY

Definition at line 75 of file typedefs.h.

◆ PINT_PTR

typedef int32_t * PINT_PTR

Definition at line 64 of file typedefs.h.

◆ PLARGE_INTEGER

Definition at line 85 of file file.c.

◆ PLIST_ENTRY

◆ PLONG

typedef int32_t * PLONG

Definition at line 58 of file typedefs.h.

◆ PLONG_PTR

typedef int32_t * PLONG_PTR

Definition at line 64 of file typedefs.h.

◆ POOL_TYPE

typedef INT POOL_TYPE

Definition at line 78 of file typedefs.h.

◆ PRTL_BITMAP

◆ PRTL_BITMAP_RUN

◆ PSHORT

typedef int16_t * PSHORT

Definition at line 55 of file typedefs.h.

◆ PSIZE_T

typedef ULONG_PTR * PSIZE_T

Definition at line 80 of file typedefs.h.

◆ PSTR

static PSTR

Definition at line 51 of file typedefs.h.

◆ PUCHAR

typedef PUCHAR

Definition at line 53 of file typedefs.h.

◆ PUINT

typedef uint32_t * PUINT

Definition at line 59 of file typedefs.h.

◆ PUINT_PTR

typedef uint32_t * PUINT_PTR

Definition at line 65 of file typedefs.h.

◆ PULONG

typedef PULONG

Definition at line 59 of file typedefs.h.

◆ PULONG_PTR

static PULONG_PTR

Definition at line 65 of file typedefs.h.

◆ PUNICODE_STRING

◆ PUSHORT

Definition at line 56 of file typedefs.h.

◆ PVOID

typedef PLDAP *typedef PVOID

Definition at line 50 of file typedefs.h.

◆ PWCHAR

typedef PWCHAR

Definition at line 56 of file typedefs.h.

◆ PWORD

typedef uint16_t * PWORD

Definition at line 56 of file typedefs.h.

◆ PWSTR

static PWSTR

Definition at line 56 of file typedefs.h.

◆ RTL_BITMAP

◆ RTL_BITMAP_RUN

◆ SHORT

typedef int16_t SHORT

Definition at line 55 of file typedefs.h.

◆ SIZE_T

static const WCHAR SIZE_T

Definition at line 80 of file typedefs.h.

◆ UCHAR

typedef unsigned char UCHAR

Definition at line 53 of file typedefs.h.

◆ UINT

typedef uint32_t UINT

Definition at line 59 of file typedefs.h.

◆ UINT16

typedef uint16_t UINT16

Definition at line 56 of file typedefs.h.

◆ UINT32

typedef uint32_t UINT32

Definition at line 59 of file typedefs.h.

◆ UINT64

typedef uint64_t UINT64

Definition at line 67 of file typedefs.h.

◆ UINT8

typedef uint8_t UINT8

Definition at line 54 of file typedefs.h.

◆ UINT_PTR

typedef uint32_t UINT_PTR

Definition at line 65 of file typedefs.h.

◆ ULONG

typedef ULONG

Definition at line 59 of file typedefs.h.

◆ ULONG64

typedef uint64_t ULONG64

Definition at line 67 of file typedefs.h.

◆ ULONG_PTR

typedef ULONG_PTR

Definition at line 65 of file typedefs.h.

◆ ULONGLONG

Definition at line 67 of file typedefs.h.

◆ UNICODE_STRING

◆ USHORT

typedef uint16_t USHORT

Definition at line 56 of file typedefs.h.

◆ VOID

typedef VOID

Definition at line 50 of file typedefs.h.

◆ WCHAR

typedef uint16_t WCHAR

Definition at line 56 of file typedefs.h.

◆ WINBOOL

typedef int32_t WINBOOL

Definition at line 58 of file typedefs.h.

◆ WORD

typedef uint16_t WORD

Definition at line 56 of file typedefs.h.

Function Documentation

◆ InitializeListHead()

static __inline VOID InitializeListHead ( IN PLIST_ENTRY  ListHead)
static

Definition at line 147 of file typedefs.h.

150{
151 ListHead->Flink = ListHead->Blink = ListHead;
152}

◆ InsertHeadList()

static __inline VOID InsertHeadList ( IN PLIST_ENTRY  ListHead,
IN PLIST_ENTRY  Entry 
)
static

Definition at line 156 of file typedefs.h.

160{
161 PLIST_ENTRY OldFlink;
162 OldFlink = ListHead->Flink;
163 Entry->Flink = OldFlink;
164 Entry->Blink = ListHead;
165 OldFlink->Blink = Entry;
166 ListHead->Flink = Entry;
167}
base of all file and directory entries
Definition: entries.h:83
Definition: typedefs.h:120
struct _LIST_ENTRY * Blink
Definition: typedefs.h:122
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121

◆ InsertTailList()

static __inline VOID InsertTailList ( IN PLIST_ENTRY  ListHead,
IN PLIST_ENTRY  Entry 
)
static

Definition at line 171 of file typedefs.h.

175{
176 PLIST_ENTRY OldBlink;
177 OldBlink = ListHead->Blink;
178 Entry->Flink = ListHead;
179 Entry->Blink = OldBlink;
180 OldBlink->Flink = Entry;
181 ListHead->Blink = Entry;
182}

◆ IsListEmpty()

static __inline BOOLEAN IsListEmpty ( IN const LIST_ENTRY ListHead)
static

Definition at line 186 of file typedefs.h.

189{
190 return (BOOLEAN)(ListHead->Flink == ListHead);
191}
unsigned char BOOLEAN

◆ RemoveEntryList()

static __inline BOOLEAN RemoveEntryList ( IN PLIST_ENTRY  Entry)
static

Definition at line 195 of file typedefs.h.

197{
198 PLIST_ENTRY OldFlink;
199 PLIST_ENTRY OldBlink;
200
201 OldFlink = Entry->Flink;
202 OldBlink = Entry->Blink;
203 OldFlink->Blink = OldBlink;
204 OldBlink->Flink = OldFlink;
205 return (BOOLEAN)(OldFlink == OldBlink);
206}

◆ RemoveHeadList()

static __inline PLIST_ENTRY RemoveHeadList ( IN PLIST_ENTRY  ListHead)
static

Definition at line 210 of file typedefs.h.

212{
213 PLIST_ENTRY Flink;
215
216 Entry = ListHead->Flink;
217 Flink = Entry->Flink;
218 ListHead->Flink = Flink;
219 Flink->Blink = ListHead;
220 return Entry;
221}

◆ RemoveTailList()

static __inline PLIST_ENTRY RemoveTailList ( IN PLIST_ENTRY  ListHead)
static

Definition at line 225 of file typedefs.h.

227{
228 PLIST_ENTRY Blink;
230
231 Entry = ListHead->Blink;
232 Blink = Entry->Blink;
233 ListHead->Blink = Blink;
234 Blink->Flink = ListHead;
235 return Entry;
236}