41#ifndef DECLSPEC_NOINITALL
43#define DECLSPEC_NOINITALL __pragma(warning(push)) __pragma(warning(disable:4845)) __declspec(no_init_all) __pragma(warning(pop))
45#define DECLSPEC_NOINITALL
93#define NULL ((void *)0)
94#define NULL64 ((void * POINTER_64)0)
98#define ARGUMENT_PRESENT(ArgumentPointer) \
99 ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
102 #define FASTCALL __stdcall
103#elif defined(_M_IX86)
104 #define FASTCALL __fastcall
112# define min(a,b) (((a) < (b)) ? (a) : (b))
115# define max(a,b) (((a) > (b)) ? (a) : (b))
131#ifndef __SECSTATUS_DEFINED__
133#define __SECSTATUS_DEFINED__
139#define TIME LARGE_INTEGER
140#define _TIME _LARGE_INTEGER
141#define PTIME PLARGE_INTEGER
142#define LowTime LowPart
143#define HighTime HighPart
155#if (_WIN32_WINNT >= 0x0600) || (defined(__cplusplus) && defined(WINDOWS_ENABLE_CPLUSPLUS))
162#if (_WIN32_WINNT >= 0x0600)
218extern "C++" template<
typename _Type>
struct _RTL_remove_const_template;
219extern "C++" template<
typename _Type>
struct _RTL_remove_const_template<
const _Type&> {
typedef _Type
type; };
220#define _RTL_CONSTANT_STRING_remove_const_macro(s) \
221 (const_cast<_RTL_remove_const_template<decltype((s)[0])>::type*>(s))
222extern "C++" template<
class _Ty>
struct _RTL_CONSTANT_STRING_type_check_template;
223extern "C++" template<
class _Ty,
int _Count>
struct _RTL_CONSTANT_STRING_type_check_template<
const _Ty (&)[
_Count]> {
typedef char type; };
224#define _RTL_CONSTANT_STRING_type_check(s) _RTL_CONSTANT_STRING_type_check_template<decltype(s)>::type
226# define _RTL_CONSTANT_STRING_remove_const_macro(s) (s)
229#define RTL_CONSTANT_STRING(s) { \
230 sizeof(s)-sizeof((s)[0]), \
231 sizeof(s) / (sizeof(_RTL_CONSTANT_STRING_type_check(s))), \
232 _RTL_CONSTANT_STRING_remove_const_macro(s) }
235#define DECLARE_UNICODE_STRING_SIZE(_var, _size) \
236 WCHAR _var ## _buffer[_size]; \
237 __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
238 UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer } \
239 __pragma(warning(pop))
241#define DECLARE_CONST_UNICODE_STRING(_var, _string) \
242 const WCHAR _var##_buffer[] = _string; \
243 __pragma(warning(push)) __pragma(warning(disable:4221)) __pragma(warning(disable:4204)) \
244 const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer } \
245 __pragma(warning(pop))
247#define DECLARE_UNICODE_STRING_SIZE(_var, _size) \
248 WCHAR _var ## _buffer[_size]; \
249 UNICODE_STRING _var = { 0, (_size) * sizeof(WCHAR) , _var ## _buffer }
251#define DECLARE_CONST_UNICODE_STRING(_var, _string) \
252 const WCHAR _var##_buffer[] = _string; \
253 const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH)_var##_buffer }
256#define DECLARE_GLOBAL_CONST_UNICODE_STRING(_var, _str) \
257 extern const __declspec(selectany) UNICODE_STRING _var = RTL_CONSTANT_STRING(_str)
290#define OBJ_HANDLE_TAGBITS 0x00000003L
293#define OBJ_INHERIT 0x00000002L
294#define OBJ_PERMANENT 0x00000010L
295#define OBJ_EXCLUSIVE 0x00000020L
296#define OBJ_CASE_INSENSITIVE 0x00000040L
297#define OBJ_OPENIF 0x00000080L
298#define OBJ_OPENLINK 0x00000100L
299#define OBJ_KERNEL_HANDLE 0x00000200L
300#define OBJ_FORCE_ACCESS_CHECK 0x00000400L
301#define OBJ_VALID_ATTRIBUTES 0x000007F2L
304#define InitializeObjectAttributes(p,n,a,r,s) { \
305 (p)->Length = sizeof(OBJECT_ATTRIBUTES); \
306 (p)->RootDirectory = (r); \
307 (p)->ObjectName = (n); \
308 (p)->Attributes = (a); \
309 (p)->SecurityDescriptor = (s); \
310 (p)->SecurityQualityOfService = NULL; \
313#define RTL_CONSTANT_OBJECT_ATTRIBUTES(n,a) { \
314 sizeof(OBJECT_ATTRIBUTES), \
316 RTL_CONST_CAST(PUNICODE_STRING)(n), \
322#define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \
323 RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a)
326 #pragma warning(push)
327 #pragma warning(disable:4214)
351#define RTL_BALANCED_NODE_RESERVED_PARENT_MASK 3
352#define RTL_BALANCED_NODE_GET_PARENT_POINTER(Node) \
353 ((PRTL_BALANCED_NODE)((Node)->ParentValue & \
354 ~RTL_BALANCED_NODE_RESERVED_PARENT_MASK))
385 ListEntry64->Flink = ListEntry32->Flink;
386 ListEntry64->Blink = ListEntry32->Blink;
396 if (((ListEntry64->Flink >> 32) != 0) ||
397 ((ListEntry64->Blink >> 32) != 0))
401 ListEntry32->Flink = ListEntry64->Flink & 0xFFFFFFFF;
402 ListEntry32->Blink = ListEntry64->Blink & 0xFFFFFFFF;
_Check_return_ _Ret_maybenull_ _In_ size_t _Count
GLuint GLuint GLsizei GLenum type
#define _Return_type_success_(c)
#define _ANONYMOUS_STRUCT
$define(_NTDDK_) $include(extypes.h) $include(cmtypes.h) $include(iotypes.h) $include(haltypes.h) $include(ketypes.h) $include(kdtypes.h) $include(mmtypes.h) $include(pstypes.h) $include(rtltypes.h) $include(setypes.h) $include(exfuncs.h) $include(halfuncs.h) $include(iofuncs.h) $include(kdfuncs.h) $include(kefuncs.h) $include(mmfuncs.h) $include(psfuncs.h) $include(rtlfuncs.h) $include(sefuncs.h) $include(zwfuncs.h) NTSYSAPI ULONGLONG NTAPI VerSetConditionMask(IN ULONGLONG ConditionMask
_In_ ULONG _In_ ULONG _In_ ULONG Length
struct _OBJECT_ATTRIBUTES32 OBJECT_ATTRIBUTES32
enum _TIMER_TYPE TIMER_TYPE
struct _OBJECT_ATTRIBUTES32 * POBJECT_ATTRIBUTES32
LARGE_INTEGER PHYSICAL_ADDRESS
struct _STRING64 * PANSI_STRING64
struct _STRING OEM_STRING
struct _STRING64 * PUNICODE_STRING64
struct _RTL_BALANCED_NODE RTL_BALANCED_NODE
struct _STRING64 ANSI_STRING64
struct _STRING32 STRING32
struct _CSTRING * PCSTRING
CONST STRING * PCOEM_STRING
struct _OBJECT_ATTRIBUTES * POBJECT_ATTRIBUTES
struct _STRING32 ANSI_STRING32
USHORT RTL_STRING_LENGTH_TYPE
$if(0) $endif() $define(_NTDEF_) $define(ULONG
enum _EVENT_TYPE EVENT_TYPE
CONST OBJECT_ATTRIBUTES32 * PCOBJECT_ATTRIBUTES32
struct _STRING32 * PUNICODE_STRING32
struct _STRING32 UNICODE_STRING32
struct _OBJECT_ATTRIBUTES64 * POBJECT_ATTRIBUTES64
struct _UNICODE_STRING * PUNICODE_STRING
struct _RTL_BALANCED_NODE * PRTL_BALANCED_NODE
struct _STRING64 UNICODE_STRING64
struct _STRING64 * PSTRING64
FORCEINLINE VOID ListEntry32To64(_In_ PLIST_ENTRY32 ListEntry32, _Out_ PLIST_ENTRY64 ListEntry64)
struct _OBJECT_ATTRIBUTES64 OBJECT_ATTRIBUTES64
char _RTL_CONSTANT_STRING_type_check(const void *s)
CONST OBJECT_ATTRIBUTES * PCOBJECT_ATTRIBUTES
struct _STRING32 * PANSI_STRING32
struct _UNICODE_STRING UNICODE_STRING
struct _OBJECT_ATTRIBUTES OBJECT_ATTRIBUTES
LARGE_INTEGER * PPHYSICAL_ADDRESS
struct _STRING ANSI_STRING
struct _STRING * PANSI_STRING
struct _STRING64 STRING64
enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
CONST OBJECT_ATTRIBUTES64 * PCOBJECT_ATTRIBUTES64
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
enum _WAIT_TYPE WAIT_TYPE
struct _STRING * POEM_STRING
struct _STRING32 * PSTRING32
FORCEINLINE VOID ListEntry64To32(_In_ PLIST_ENTRY64 ListEntry64, _Out_ PLIST_ENTRY32 ListEntry32)
const UNICODE_STRING * PCUNICODE_STRING
$include(setypes.h) $include(obtypes.h) $include(rtltypes.h) $include(rtlfuncs.h) _IRQL_requires_max_(PASSIVE_LEVEL) __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtQueryObject(_In_opt_ HANDLE Handle
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
ULONG SecurityQualityOfService
ULONG64 SecurityQualityOfService
ULONG64 SecurityDescriptor
PVOID SecurityQualityOfService
PUNICODE_STRING ObjectName
_ANONYMOUS_UNION union _QUAD::@4427 DUMMYUNIONNAME
__GNU_EXTENSION __int64 UseThisFieldToCopy
_ANONYMOUS_UNION union _RTL_BALANCED_NODE::@4428 DUMMYUNIONNAME
struct _RTL_BALANCED_NODE * Children[2]
_ANONYMOUS_UNION union _RTL_BALANCED_NODE::@4429 DUMMYUNIONNAME2
_ANONYMOUS_STRUCT struct _RTL_BALANCED_NODE::@4428::@4430 DUMMYSTRUCTNAME
struct _RTL_BALANCED_NODE * Right
struct _RTL_BALANCED_NODE * Left
_Field_size_bytes_part_opt_(MaximumLength, Length) PCHAR Buffer
_Field_size_bytes_part_(MaximumLength, Length) PWCH Buffer
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength