18#define DWORD_PTR UINT_PTR
19#define LONG_PTR INT_PTR
20#define ULONG_PTR UINT_PTR
26#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)
27# define _TYPE_ALIGNMENT(type) __alignof(type)
28#elif defined(__GNUC__)
29# define _TYPE_ALIGNMENT(type) __alignof__(type)
38#if defined(TYPE_ALIGNMENT) && defined(_MSC_VER) && _MSC_VER >= 800 && !defined(__cplusplus)
39#pragma warning(disable:4116)
42#if !defined(TYPE_ALIGNMENT) && defined(_TYPE_ALIGNMENT)
43# define TYPE_ALIGNMENT _TYPE_ALIGNMENT
50#define TEST_TYPE_SIZE(type, size) C_ASSERT(sizeof(type) == size);
53# define TEST_TYPE_ALIGN(type, align) C_ASSERT(TYPE_ALIGNMENT(type) == align);
55# define TEST_TYPE_ALIGN(type, align)
59# define TEST_TARGET_ALIGN(type, align) C_ASSERT(_TYPE_ALIGNMENT(*(type)0) == align);
60# define TEST_FIELD_ALIGN(type, field, align) C_ASSERT(_TYPE_ALIGNMENT(((type*)0)->field) == align);
62# define TEST_TARGET_ALIGN(type, align)
63# define TEST_FIELD_ALIGN(type, field, align)
66#define TEST_FIELD_OFFSET(type, field, offset) C_ASSERT(FIELD_OFFSET(type, field) == offset);
68#define TEST_TARGET_SIZE(type, size) TEST_TYPE_SIZE(*(type)0, size)
69#define TEST_FIELD_SIZE(type, field, size) TEST_TYPE_SIZE((((type*)0)->field), size)
70#define TEST_TYPE_SIGNED(type) C_ASSERT((type) -1 < 0);
71#define TEST_TYPE_UNSIGNED(type) C_ASSERT((type) -1 > 0);
unsigned long long UINT64
_Inout_ PIRP _In_ NTSTATUS ExceptionCode
static const ACEFLAG AceFlags[]
static const ACEFLAG AceType[]
static const WCHAR Signature[]
#define TEST_TARGET_SIZE(type, size)
#define TEST_FIELD_OFFSET(type, field, offset)
#define TEST_TARGET_ALIGN(type, align)
static void test_pack(void)
#define TEST_TYPE_SIZE(type, size)
#define TEST_FIELD_SIZE(type, field, size)
#define TEST_TYPE_ALIGN(type, align)
#define TEST_FIELD_ALIGN(type, field, align)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble GLdouble top
unsigned long long DWORDLONG
CRITICAL_SECTION CriticalSection
BYTE SECURITY_CONTEXT_TRACKING_MODE
WORD SECURITY_DESCRIPTOR_CONTROL
DWORD SECURITY_INFORMATION
unsigned __int3264 UINT_PTR
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
__kernel_entry _Inout_ _Inout_ PSIZE_T RegionSize
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID _Inout_ PULONG _Out_writes_bytes_to_opt_ PrimaryGroupSize PSID PrimaryGroup
_In_ PSID_IDENTIFIER_AUTHORITY _In_ UCHAR SubAuthorityCount
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL Sacl
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
VOID(NTAPI * WAITORTIMERCALLBACKFUNC)(PVOID pvContext, BOOLEAN fTimerOrWaitFired)
LONG(NTAPI * PVECTORED_EXCEPTION_HANDLER)(PEXCEPTION_POINTERS ExceptionPointers)
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
*RESTRICTED_POINTER PRLIST_ENTRY
_In_ ULONG _In_ ULONG _In_ ULONG Length
static void test_pack_IMAGE_NT_HEADERS(void)
static void test_pack_PEXCEPTION_RECORD(void)
static void test_pack_OBJECT_TYPE_LIST(void)
static void test_pack_INT(void)
static void test_pack_IMAGE_RESOURCE_DIRECTORY_STRING(void)
static void test_pack_PSTR(void)
static void test_pack_IMAGE_BOUND_FORWARDER_REF(void)
static void test_pack_IMAGE_COFF_SYMBOLS_HEADER(void)
static void test_pack_PIMAGE_RESOURCE_DIR_STRING_U(void)
static void test_pack_IMAGE_SECTION_HEADER(void)
static void test_pack_IMAGE_VXD_HEADER(void)
static void test_pack_PIMAGE_SECTION_HEADER(void)
static void test_pack_IMAGE_TLS_DIRECTORY32(void)
static void test_pack_PIMAGE_RESOURCE_DIRECTORY(void)
static void test_pack_TOKEN_USER(void)
static void test_pack_PIMAGE_THUNK_DATA(void)
static void test_pack_POINTL(void)
static void test_pack_IMAGE_OPTIONAL_HEADER32(void)
static void test_pack_IMAGE_DOS_HEADER(void)
static void test_pack_PIMAGE_EXPORT_DIRECTORY(void)
static void test_pack_ULONG64(void)
static void test_pack_INT64(void)
static void test_pack_ULONG_PTR(void)
static void test_pack_IMAGE_DEBUG_MISC(void)
static void test_pack_IMAGE_RESOURCE_DIRECTORY(void)
static void test_pack_PIMAGE_TLS_DIRECTORY(void)
static void test_pack_PIMAGE_FUNCTION_ENTRY(void)
static void test_pack_PACE_HEADER(void)
static void test_pack_SYSTEM_ALARM_ACE(void)
static void test_pack_PSYSTEM_ALARM_ACE(void)
static void test_pack_FPO_DATA(void)
static void test_pack_PCSTR(void)
static void test_pack_BYTE(void)
static void test_pack_LCID(void)
static void test_pack_PACCESS_ALLOWED_ACE(void)
static void test_pack_GENERIC_MAPPING(void)
static void test_pack_HMODULE(void)
static void test_pack_PACL(void)
static void test_pack_PLARGE_INTEGER(void)
static void test_pack_LONG32(void)
static void test_pack_PSYSTEM_AUDIT_ACE(void)
static void test_pack_HGDIOBJ(void)
static void test_pack_RTL_OSVERSIONINFOEXW(void)
static void test_pack_IMAGE_TLS_DIRECTORY64(void)
static void test_pack_PSZ(void)
static void test_pack_IMAGE_NT_HEADERS32(void)
static void test_pack_PIMAGE_LINENUMBER(void)
static void test_pack_TOKEN_STATISTICS(void)
static void test_pack_TOKEN_DEFAULT_DACL(void)
static void test_pack_PISID(void)
static void test_pack_LIST_ENTRY(void)
static void test_pack_PFPO_DATA(void)
static void test_pack_HALF_PTR(void)
static void test_pack_PSIZE(void)
static void test_pack_PIMAGE_OPTIONAL_HEADER64(void)
static void test_pack_PIMAGE_RESOURCE_DATA_ENTRY(void)
static void test_pack_PIMAGE_TLS_CALLBACK(void)
static void test_pack_CCHAR(void)
static void test_pack_INT8(void)
static void test_pack_PIMAGE_OS2_HEADER(void)
static void test_pack_PIMAGE_BOUND_IMPORT_DESCRIPTOR(void)
static void test_pack_PWCH(void)
static void test_pack_IMAGE_BASE_RELOCATION(void)
static void test_pack_IMAGE_BOUND_IMPORT_DESCRIPTOR(void)
static void test_pack_ATOM(void)
static void test_pack_LPRECTL(void)
static void test_pack_SIZE(void)
static void test_pack_RTL_OSVERSIONINFOW(void)
static void test_pack_IMAGE_AUX_SYMBOL(void)
static void test_pack_ACCESS_DENIED_ACE(void)
static void test_pack_IMAGE_RESOURCE_DIRECTORY_ENTRY(void)
static void test_pack_IMAGE_RELOCATION(void)
static void test_pack_PPOINT(void)
static void test_pack_PRLIST_ENTRY(void)
static void test_pack_INT32(void)
static void test_pack_SECURITY_DESCRIPTOR_CONTROL(void)
static void test_pack_PIMAGE_NT_HEADERS64(void)
static void test_pack_PIMAGE_DOS_HEADER(void)
static void test_pack_WAITORTIMERCALLBACKFUNC(void)
static void test_pack_TOKEN_PRIVILEGES(void)
static void test_pack_UINT16(void)
static void test_pack_PMESSAGE_RESOURCE_DATA(void)
static void test_pack_LOCALHANDLE(void)
static void test_pack_PSID_IDENTIFIER_AUTHORITY(void)
static void test_pack_LPCRECTL(void)
static void test_pack_LONG64(void)
static void test_pack_HRESULT(void)
static void test_pack_PTOKEN_USER(void)
static void test_pack_PIMAGE_VXD_HEADER(void)
static void test_pack_PIO_COUNTERS(void)
static void test_pack_SSIZE_T(void)
static void test_pack_IMAGE_SYMBOL(void)
static void test_pack_PTOKEN_PRIVILEGES(void)
static void test_pack_PRTL_RESOURCE_DEBUG(void)
static void test_pack_PIMAGE_COFF_SYMBOLS_HEADER(void)
static void test_pack_PEXCEPTION_POINTERS(void)
static void test_pack_HCURSOR(void)
static void test_pack_SID_IDENTIFIER_AUTHORITY(void)
static void test_pack_LARGE_INTEGER(void)
static void test_pack_PLIST_ENTRY(void)
static void test_pack_IMAGE_DATA_DIRECTORY(void)
static void test_pack_PRTL_OSVERSIONINFOW(void)
static void test_pack_PRECT(void)
static void test_pack_SIZEL(void)
static void test_pack_HLOCAL(void)
static void test_pack_IMAGE_FILE_HEADER(void)
static void test_pack_IMAGE_RESOURCE_DATA_ENTRY(void)
static void test_pack_LPPOINT(void)
static void test_pack_NT_TIB(void)
static void test_pack_USHORT(void)
static void test_pack_PIMAGE_ARCHIVE_MEMBER_HEADER(void)
static void test_pack_ACL_SIZE_INFORMATION(void)
static void test_pack_LONG(void)
static void test_pack_WORD(void)
static void test_pack_PSECURITY_DESCRIPTOR(void)
static void test_pack_LPARAM(void)
static void test_pack_IMAGE_IMPORT_BY_NAME(void)
static void test_pack_PROC(void)
static void test_pack_ACL(void)
static void test_pack_LPSIZE(void)
static void test_pack_TOKEN_PRIMARY_GROUP(void)
static void test_pack_IMAGE_LINENUMBER(void)
static void test_pack_LRESULT(void)
static void test_pack_LUID(void)
static void test_pack_FLOAT(void)
static void test_pack_DWORD64(void)
static void test_pack_PRIVILEGE_SET(void)
static void test_pack_DWORDLONG(void)
static void test_pack_ACL_REVISION_INFORMATION(void)
static void test_pack_UCHAR(void)
static void test_pack_ULARGE_INTEGER(void)
static void test_pack_INT_PTR(void)
static void test_pack_PMESSAGE_RESOURCE_BLOCK(void)
static void test_pack_LPCRECT(void)
static void test_pack_DWORD(void)
static void test_pack_MEMORY_BASIC_INFORMATION(void)
static void test_pack_RECT(void)
static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY64(void)
static void test_pack_PSECURITY_QUALITY_OF_SERVICE(void)
static void test_pack_PHANDLE(void)
static void test_pack_SINGLE_LIST_ENTRY(void)
static void test_pack_ULONG(void)
static void test_pack_GLOBALHANDLE(void)
static void test_pack_IMAGE_FUNCTION_ENTRY(void)
static void test_pack_IMAGE_EXPORT_DIRECTORY(void)
static void test_pack_IMAGE_SEPARATE_DEBUG_HEADER(void)
static void test_pack_SYSTEM_AUDIT_ACE(void)
#define TEST_TYPE_UNSIGNED(type)
static void test_pack_HFILE(void)
static void test_pack_UINT32(void)
static void test_pack_RECTL(void)
static void test_pack_PPOINTL(void)
#define TEST_TYPE_SIGNED(type)
static void test_pack_PIMAGE_BOUND_FORWARDER_REF(void)
static void test_pack_UINT64(void)
static void test_pack_SECURITY_DESCRIPTOR_RELATIVE(void)
static void test_pack_SID_AND_ATTRIBUTES(void)
static void test_pack_WPARAM(void)
static void test_pack_EXCEPTION_RECORD(void)
static void test_pack_PLUID_AND_ATTRIBUTES(void)
static void test_pack_IO_COUNTERS(void)
static void test_pack_PCWSTR(void)
static void test_pack_PIMAGE_NT_HEADERS32(void)
static void test_pack_LONGLONG(void)
static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY32(void)
static void test_pack_PRECTL(void)
static void test_pack_PISECURITY_DESCRIPTOR_RELATIVE(void)
static void test_pack_PISECURITY_DESCRIPTOR(void)
static void test_pack_IMAGE_TLS_DIRECTORY(void)
static void test_pack_PIMAGE_IMPORT_BY_NAME(void)
static void test_pack_PIMAGE_RESOURCE_DIRECTORY_STRING(void)
static void test_pack_ACCESS_ALLOWED_ACE(void)
static void test_pack_PIMAGE_DATA_DIRECTORY(void)
static void test_pack_SID(void)
static void test_pack_RTL_CRITICAL_SECTION(void)
static void test_pack_PACL_SIZE_INFORMATION(void)
static void test_pack_PTOKEN_GROUPS(void)
static void test_pack_UINT(void)
static void test_pack_RTL_CRITICAL_SECTION_DEBUG(void)
static void test_pack_LUID_AND_ATTRIBUTES(void)
static void test_pack_WCHAR(void)
static void test_pack_PIMAGE_NT_HEADERS(void)
static void test_pack_PIMAGE_OPTIONAL_HEADER(void)
static void test_pack_UHALF_PTR(void)
static void test_pack_POINT(void)
static void test_pack_PIMAGE_DEBUG_DIRECTORY(void)
static void test_pack_ULONGLONG(void)
static void test_pack_PIMAGE_IMPORT_DESCRIPTOR(void)
static void test_pack_UINT8(void)
static void test_pack_PIMAGE_OPTIONAL_HEADER32(void)
static void test_pack_LPCVOID(void)
static void test_pack_EXCEPTION_POINTERS(void)
static void test_pack_IMAGE_IMPORT_DESCRIPTOR(void)
static void test_pack_POBJECT_TYPE_LIST(void)
static void test_pack_SHORT(void)
static void test_pack_PRTL_CRITICAL_SECTION_DEBUG(void)
static void test_pack_PIMAGE_LOAD_CONFIG_DIRECTORY(void)
static void test_pack_PIMAGE_RELOCATION(void)
static void test_pack_PACCESS_DENIED_ACE(void)
static void test_pack_ACCESS_MASK(void)
static void test_pack_PIMAGE_SEPARATE_DEBUG_HEADER(void)
static void test_pack_MESSAGE_RESOURCE_DATA(void)
static void test_pack_SECURITY_CONTEXT_TRACKING_MODE(void)
static void test_pack_PLUID(void)
static void test_pack_PIMAGE_SYMBOL(void)
static void test_pack_ACE_HEADER(void)
static void test_pack_LONG_PTR(void)
static void test_pack_SECURITY_INFORMATION(void)
static void test_pack_PIMAGE_DEBUG_MISC(void)
static void test_pack_PGENERIC_MAPPING(void)
static void test_pack_COLORREF(void)
static void test_pack_PVOID(void)
static void test_pack_HGLOBAL(void)
static void test_pack_PSINGLE_LIST_ENTRY(void)
static void test_pack_PCCH(void)
static void test_pack_EXECUTION_STATE(void)
static void test_pack_TOKEN_OWNER(void)
static void test_pack_PVECTORED_EXCEPTION_HANDLER(void)
static void test_pack_TOKEN_SOURCE(void)
static void test_pack_SECURITY_DESCRIPTOR(void)
static void test_pack_FARPROC(void)
static void test_pack_MESSAGE_RESOURCE_BLOCK(void)
static void test_pack_IMAGE_OS2_HEADER(void)
static void test_pack_INT16(void)
static void test_pack_PIMAGE_RESOURCE_DIRECTORY_ENTRY(void)
static void test_pack_IMAGE_RESOURCE_DIR_STRING_U(void)
static void test_pack_PNT_TIB(void)
static void test_pack_IMAGE_THUNK_DATA(void)
static void test_pack_PSID(void)
static void test_pack_PACCESS_TOKEN(void)
static void test_pack_PPRIVILEGE_SET(void)
static void test_pack_CHAR(void)
static void test_pack_BOOLEAN(void)
static void test_pack_TOKEN_GROUPS(void)
static void test_pack_PIMAGE_BASE_RELOCATION(void)
static void test_pack_PWSTR(void)
static void test_pack_PRTL_OSVERSIONINFOEXW(void)
static void test_pack_IMAGE_DEBUG_DIRECTORY(void)
static void test_pack_MESSAGE_RESOURCE_ENTRY(void)
static void test_pack_IMAGE_OPTIONAL_HEADER(void)
static void test_pack_RTL_RESOURCE_DEBUG(void)
static void test_pack_PCH(void)
static void test_pack_LPRECT(void)
static void test_pack_IMAGE_LOAD_CONFIG_DIRECTORY(void)
static void test_pack_UINT_PTR(void)
static void test_pack_PACL_REVISION_INFORMATION(void)
static void test_pack_IMAGE_ARCHIVE_MEMBER_HEADER(void)
static void test_pack_DWORD32(void)
static void test_pack_PMESSAGE_RESOURCE_ENTRY(void)
static void test_pack_ULONG32(void)
static void test_pack_DWORD_PTR(void)
static void test_pack_SIZE_T(void)
static void test_pack_HANDLE(void)
static void test_pack_LANGID(void)
static void test_pack_PMEMORY_BASIC_INFORMATION(void)
static void test_pack_PRTL_CRITICAL_SECTION(void)
static void test_pack_IMAGE_NT_HEADERS64(void)
static void test_pack_IMAGE_OPTIONAL_HEADER64(void)
static void test_pack_PIMAGE_FILE_HEADER(void)
static void test_pack_PULARGE_INTEGER(void)
static void test_pack_SECURITY_QUALITY_OF_SERVICE(void)
static void test_pack_PIMAGE_AUX_SYMBOL(void)
static void test_pack_BOOL(void)
static void test_pack_PCWCH(void)
VOID(NTAPI * PIMAGE_TLS_CALLBACK)(PVOID DllHandle, ULONG Reason, PVOID Reserved)
struct _IMAGE_RELOCATION UNALIGNED * PIMAGE_RELOCATION
struct _IMAGE_SYMBOL UNALIGNED * PIMAGE_SYMBOL
_Out_opt_ int _Out_opt_ int * cy
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ WDF_WMI_PROVIDER_CONTROL Control
_Reserved_ PVOID Reserved
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
_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 OwningThread
_Must_inspect_result_ _In_ ULONG Flags
_In_ ULONG _In_ ULONG AclRevision
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
* PSID_IDENTIFIER_AUTHORITY
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Protect