📄 winnt.h
字号:
#define STATUS_ACCESS_DENIED 0xC0000022#define STATUS_BUFFER_TOO_SMALL 0xC0000023#define STATUS_OBJECT_TYPE_MISMATCH 0xC0000024#define STATUS_NONCONTINUABLE_EXCEPTION 0xC0000025#define STATUS_INVALID_DISPOSITION 0xC0000026#define STATUS_UNWIND 0xC0000027#define STATUS_BAD_STACK 0xC0000028#define STATUS_INVALID_UNWIND_TARGET 0xC0000029#define STATUS_NOT_LOCKED 0xC000002A#define STATUS_PARITY_ERROR 0xC000002B#define STATUS_UNABLE_TO_DECOMMIT_VM 0xC000002C#define STATUS_NOT_COMMITTED 0xC000002D#define STATUS_INVALID_PORT_ATTRIBUTES 0xC000002E#define STATUS_PORT_MESSAGE_TOO_LONG 0xC000002F#define STATUS_INVALID_PARAMETER_MIX 0xC0000030#define STATUS_INVALID_QUOTA_LOWER 0xC0000031#define STATUS_DISK_CORRUPT_ERROR 0xC0000032#define STATUS_OBJECT_NAME_INVALID 0xC0000033#define STATUS_OBJECT_NAME_NOT_FOUND 0xC0000034#define STATUS_OBJECT_NAME_COLLISION 0xC0000035#define STATUS_PORT_DISCONNECTED 0xC0000037#define STATUS_DEVICE_ALREADY_ATTACHED 0xC0000038#define STATUS_OBJECT_PATH_INVALID 0xC0000039#define STATUS_OBJECT_PATH_NOT_FOUND 0xC000003A#define STATUS_PATH_SYNTAX_BAD 0xC000003B#define STATUS_DATA_OVERRUN 0xC000003C#define STATUS_DATA_LATE_ERROR 0xC000003D#define STATUS_DATA_ERROR 0xC000003E#define STATUS_CRC_ERROR 0xC000003F#define STATUS_SECTION_TOO_BIG 0xC0000040#define STATUS_PORT_CONNECTION_REFUSED 0xC0000041#define STATUS_INVALID_PORT_HANDLE 0xC0000042#define STATUS_SHARING_VIOLATION 0xC0000043#define STATUS_QUOTA_EXCEEDED 0xC0000044#define STATUS_INVALID_PAGE_PROTECTION 0xC0000045#define STATUS_MUTANT_NOT_OWNED 0xC0000046#define STATUS_SEMAPHORE_LIMIT_EXCEEDED 0xC0000047#define STATUS_PORT_ALREADY_SET 0xC0000048#define STATUS_SUSPEND_COUNT_EXCEEDED 0xC000004A#define STATUS_LOCK_NOT_GRANTED 0xC0000054 /* FIXME: not sure */#define STATUS_FILE_LOCK_CONFLICT 0xC0000055 /* FIXME: not sure */#define STATUS_UNKNOWN_REVISION 0xC0000058#define STATUS_INVALID_SECURITY_DESCR 0xC0000079#define STATUS_DISK_FULL 0xC000007F #define STATUS_SECTION_NOT_EXTENDED 0xC0000087#define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C#define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D#define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E#define STATUS_FLOAT_INEXACT_RESULT 0xC000008F#define STATUS_FLOAT_INVALID_OPERATION 0xC0000090#define STATUS_FLOAT_OVERFLOW 0xC0000091#define STATUS_FLOAT_STACK_CHECK 0xC0000092#define STATUS_FLOAT_UNDERFLOW 0xC0000093#define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094#define STATUS_INTEGER_OVERFLOW 0xC0000095#define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096#define STATUS_MEDIA_WRITE_PROTECTED 0XC00000A2#define STATUS_INVALID_PARAMETER_2 0xC00000F0#define STATUS_STACK_OVERFLOW 0xC00000FD#define STATUS_DIRECTORY_NOT_EMPTY 0xC0000101#define STATUS_TOO_MANY_OPENED_FILES 0xC000011F#define STATUS_CONTROL_C_EXIT 0xC000013A#define STATUS_PIPE_BROKEN 0xC000014B#define STATUS_NOT_REGISTRY_FILE 0xC000015C#define STATUS_PARTITION_FAILURE 0xC0000172#define STATUS_INVALID_BLOCK_LENGTH 0xC0000173#define STATUS_DEVICE_NOT_PARTITIONED 0xC0000174#define STATUS_UNABLE_TO_LOCK_MEDIA 0xC0000175#define STATUS_UNABLE_TO_UNLOAD_MEDIA 0xC0000176#define STATUS_EOM_OVERFLOW 0xC0000177#define STATUS_NO_MEDIA 0xC0000178#define STATUS_NO_SUCH_MEMBER 0xC000017A#define STATUS_INVALID_MEMBER 0xC000017B#define STATUS_KEY_DELETED 0xC000017C#define STATUS_NO_LOG_SPACE 0xC000017D#define STATUS_TOO_MANY_SIDS 0xC000017E#define STATUS_LM_CROSS_ENCRYPTION_REQUIRED 0xC000017F#define STATUS_KEY_HAS_CHILDREN 0xC0000180#define STATUS_CHILD_MUST_BE_VOLATILE 0xC0000181#define STATUS_DEVICE_CONFIGURATION_ERROR0xC0000182#define STATUS_DRIVER_INTERNAL_ERROR 0xC0000183#define STATUS_INVALID_DEVICE_STATE 0xC0000184#define STATUS_IO_DEVICE_ERROR 0xC0000185#define STATUS_DEVICE_PROTOCOL_ERROR 0xC0000186#define STATUS_BACKUP_CONTROLLER 0xC0000187#define STATUS_LOG_FILE_FULL 0xC0000188#define STATUS_TOO_LATE 0xC0000189#define STATUS_NO_TRUST_LSA_SECRET 0xC000018A#define STATUS_NO_TRUST_SAM_ACCOUNT 0xC000018B#define STATUS_TRUSTED_DOMAIN_FAILURE 0xC000018C#define STATUS_TRUSTED_RELATIONSHIP_FAILURE 0xC000018D#define STATUS_EVENTLOG_FILE_CORRUPT 0xC000018E#define STATUS_EVENTLOG_CANT_START 0xC000018F#define STATUS_TRUST_FAILURE 0xC0000190#define STATUS_MUTANT_LIMIT_EXCEEDED 0xC0000191#define STATUS_NETLOGON_NOT_STARTED 0xC0000192#define STATUS_ACCOUNT_EXPIRED 0xC0000193#define STATUS_POSSIBLE_DEADLOCK 0xC0000194#define STATUS_NETWORK_CREDENTIAL_CONFLICT 0xC0000195#define STATUS_REMOTE_SESSION_LIMIT 0xC0000196#define STATUS_EVENTLOG_FILE_CHANGED 0xC0000197#define STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT 0xC0000198#define STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT 0xC0000199#define STATUS_NOLOGON_SERVER_TRUST_ACCOUNT 0xC000019A#define STATUS_DOMAIN_TRUST_INCONSISTENT 0xC000019B#define STATUS_FS_DRIVER_REQUIRED 0xC000019C#define STATUS_RESOURCE_LANG_NOT_FOUND 0xC0000204#define MAXIMUM_WAIT_OBJECTS 64#define MAXIMUM_SUSPEND_COUNT 127/* * Return values from the actual exception handlers */#define ExceptionContinueExecution 0#define ExceptionContinueSearch 1#define ExceptionNestedException 2#define ExceptionCollidedUnwind 3 /* * Return values from filters in except() and from UnhandledExceptionFilter */ #define EXCEPTION_EXECUTE_HANDLER 1#define EXCEPTION_CONTINUE_SEARCH 0#define EXCEPTION_CONTINUE_EXECUTION -1/* * From OS/2 2.0 exception handling * Win32 seems to use the same flags as ExceptionFlags in an EXCEPTION_RECORD */#define EH_NONCONTINUABLE 0x01#define EH_UNWINDING 0x02#define EH_EXIT_UNWIND 0x04#define EH_STACK_INVALID 0x08#define EH_NESTED_CALL 0x10#define EXCEPTION_CONTINUABLE 0#define EXCEPTION_NONCONTINUABLE EH_NONCONTINUABLE /* * The exception record used by Win32 to give additional information * about exception to exception handlers. */#define EXCEPTION_MAXIMUM_PARAMETERS 15typedef struct EXCEPTION_RECORD{ DWORD ExceptionCode; DWORD ExceptionFlags; struct EXCEPTION_RECORD *ExceptionRecord; LPVOID ExceptionAddress; DWORD NumberParameters; DWORD ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];} EXCEPTION_RECORD, *PEXCEPTION_RECORD;/* * The exception pointers structure passed to exception filters * in except() and the UnhandledExceptionFilter(). */ typedef struct EXCEPTION_POINTERS{ PEXCEPTION_RECORD ExceptionRecord; PCONTEXT ContextRecord;} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;/* * The exception frame, used for registering exception handlers * Win32 cares only about this, but compilers generally emit * larger exception frames for their own use. */struct EXCEPTION_FRAME;typedef DWORD (*PEXCEPTION_HANDLER)(PEXCEPTION_RECORD, struct EXCEPTION_FRAME*, PCONTEXT, struct EXCEPTION_FRAME **);typedef struct EXCEPTION_FRAME{ struct EXCEPTION_FRAME *Prev; PEXCEPTION_HANDLER Handler;} EXCEPTION_FRAME, *PEXCEPTION_FRAME;#include "poppack.h"/* * function pointer to a exception filter */typedef LONG CALLBACK (*PTOP_LEVEL_EXCEPTION_FILTER)(PEXCEPTION_POINTERS ExceptionInfo);typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;DWORD WINAPI UnhandledExceptionFilter( PEXCEPTION_POINTERS epointers );LPTOP_LEVEL_EXCEPTION_FILTERWINAPI SetUnhandledExceptionFilter( LPTOP_LEVEL_EXCEPTION_FILTER filter );/* status values for ContinueDebugEvent */#define DBG_CONTINUE 0x00010002#define DBG_TERMINATE_THREAD 0x40010003#define DBG_TERMINATE_PROCESS 0x40010004#define DBG_CONTROL_C 0x40010005#define DBG_CONTROL_BREAK 0x40010008#define DBG_EXCEPTION_NOT_HANDLED 0x80010001typedef struct NT_TIB{ struct EXCEPTION_REGISTRATION_RECORD *ExceptionList; PVOID StackBase; PVOID StackLimit; PVOID SubSystemTib; union { PVOID FiberData; DWORD Version; } DUMMYUNIONNAME; PVOID ArbitraryUserPointer; struct NT_TIB *Self;} NT_TIB, *PNT_TIB;struct TEB;/*#if defined(__i386__) && defined(__GNUC__)extern inline struct TEB * WINAPI NtCurrentTeb(void);extern inline struct TEB * WINAPI NtCurrentTeb(void){ struct TEB *teb; __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb)); return teb;}#elseextern struct TEB * WINAPI NtCurrentTeb(void);#endif*//* * File formats definitions */typedef struct IMAGE_DOS_HEADER { WORD e_magic; /* 00: MZ Header signature */ WORD e_cblp; /* 02: Bytes on last page of file */ WORD e_cp; /* 04: Pages in file */ WORD e_crlc; /* 06: Relocations */ WORD e_cparhdr; /* 08: Size of header in paragraphs */ WORD e_minalloc; /* 0a: Minimum extra paragraphs needed */ WORD e_maxalloc; /* 0c: Maximum extra paragraphs needed */ WORD e_ss; /* 0e: Initial (relative) SS value */ WORD e_sp; /* 10: Initial SP value */ WORD e_csum; /* 12: Checksum */ WORD e_ip; /* 14: Initial IP value */ WORD e_cs; /* 16: Initial (relative) CS value */ WORD e_lfarlc; /* 18: File address of relocation table */ WORD e_ovno; /* 1a: Overlay number */ WORD e_res[4]; /* 1c: Reserved words */ WORD e_oemid; /* 24: OEM identifier (for e_oeminfo) */ WORD e_oeminfo; /* 26: OEM information; e_oemid specific */ WORD e_res2[10]; /* 28: Reserved words */ DWORD e_lfanew; /* 3c: Offset to extended header */} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */#define IMAGE_OS2_SIGNATURE 0x454E /* NE */#define IMAGE_OS2_SIGNATURE_LE 0x454C /* LE */#define IMAGE_OS2_SIGNATURE_LX 0x584C /* LX */#define IMAGE_VXD_SIGNATURE 0x454C /* LE */#define IMAGE_NT_SIGNATURE 0x00004550 /* PE00 *//* * This is the Windows executable (NE) header. * the name IMAGE_OS2_HEADER is misleading, but in the SDK this way. */typedef struct { WORD ne_magic; /* 00 NE signature 'NE' */ BYTE ne_ver; /* 02 Linker version number */ BYTE ne_rev; /* 03 Linker revision number */ WORD ne_enttab; /* 04 Offset to entry table relative to NE */ WORD ne_cbenttab; /* 06 Length of entry table in bytes */ LONG ne_crc; /* 08 Checksum */ WORD ne_flags; /* 0c Flags about segments in this file */ WORD ne_autodata; /* 0e Automatic data segment number */ WORD ne_heap; /* 10 Initial size of local heap */ WORD ne_stack; /* 12 Initial size of stack */ DWORD ne_csip; /* 14 Initial CS:IP */ DWORD ne_sssp; /* 18 Initial SS:SP */ WORD ne_cseg; /* 1c # of entries in segment table */ WORD ne_cmod; /* 1e # of entries in module reference tab. */ WORD ne_cbnrestab; /* 20 Length of nonresident-name table */ WORD ne_segtab; /* 22 Offset to segment table */ WORD ne_rsrctab; /* 24 Offset to resource table */ WORD ne_restab; /* 26 Offset to resident-name table */ WORD ne_modtab; /* 28 Offset to module reference table */ WORD ne_imptab; /* 2a Offset to imported name table */ DWORD ne_nrestab; /* 2c Offset to nonresident-name table */ WORD ne_cmovent; /* 30 # of movable entry points */ WORD ne_align; /* 32 Logical sector alignment shift count */ WORD ne_cres; /* 34 # of resource segments */ BYTE ne_exetyp; /* 36 Flags indicating target OS */ BYTE ne_flagsothers; /* 37 Additional information flags */ WORD fastload_offset; /* 38 Offset to fast load area (should be ne_pretthunks)*/ WORD fastload_length; /* 3a Length of fast load area (should be ne_psegrefbytes) */ WORD ne_swaparea; /* 3c Reserved by Microsoft */ WORD ne_expver; /* 3e Expected Windows version number */} IMAGE_OS2_HEADER,*PIMAGE_OS2_HEADER;typedef struct IMAGE_VXD_HEADER { WORD e32_magic; BYTE e32_border; BYTE e32_worder; DWORD e32_level; WORD e32_cpu; WORD e32_os; DWORD e32_ver; DWORD e32_mflags; DWORD e32_mpages; DWORD e32_startobj; DWORD e32_eip; DWORD e32_stackobj; DWORD e32_esp; DWORD e32_pagesize; DWORD e32_lastpagesize; DWORD e32_fixupsize; DWORD e32_fixupsum; DWORD e32_ldrsize; DWORD e32_ldrsum; DWORD e32_objtab; DWORD e32_objcnt; DWORD e32_objmap; DWORD e32_itermap; DWORD e32_rsrctab; DWORD e32_rsrccnt; DWORD e32_restab; DWORD e32_enttab; DWORD e32_dirtab; DWORD e32_dircnt; DWORD e32_fpagetab; DWORD e32_frectab; DWORD e32_impmod; DWORD e32_impmodcnt; DWORD e32_impproc; DWORD e32_pagesum; DWORD e32_datapage; DWORD e32_preload; DWORD e32_nrestab; DWORD e32_cbnrestab; DWORD e32_nressum; DWORD e32_autodata; DWORD e32_debuginfo; DWORD e32_debuglen; DWORD e32_instpreload; DWORD e32_instdemand; DWORD e32_heapsize; BYTE e32_res3[12]; DWORD e32_winresoff; DWORD e32_winreslen; WORD e32_devid; WORD e32_ddkver;} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;/* These defines describe the meanings of the bits in the Characteristics field */#define IMAGE_FILE_RELOCS_STRIPPED 0x0001 /* No relocation info */#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002#define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004#define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008#define IMAGE_FILE_16BIT_MACHINE 0x0040#define IMAGE_FILE_BYTES_REVERSED_LO 0x0080#define IMAGE_FILE_32BIT_MACHINE 0x0100#define IMAGE_FILE_DEBUG_STRIPPED 0x0200#define IMAGE_FILE_SYSTEM 0x1000#define IMAGE_FILE_DLL 0x2000#define IMAGE_FILE_BYTES_REVERSED_HI 0x8000/* These are the settings of the Machine field. */#define IMAGE_FILE_MACHINE_UNKNOWN 0#define IMAGE_FILE_MACHINE_I860 0x14d#define IMAGE_FILE_MACHINE_I386 0x14c#define IMAGE_FILE_MACHINE_R3000 0x162#define IMAGE_FILE_MACHINE_R4000 0x166#define IMAGE_FILE_MACHINE_R10000 0x168#define IMAGE_FILE_MACHINE_ALPHA 0x184#define IMAGE_FILE_MACHINE_POWERPC 0x1F0 #define IMAGE_SIZEOF_FILE_HEADER 20/* Possible Magic values */#define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b#define IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107/* These are indexes into the DataDirectory array */#define IMAGE_FILE_EXPORT_DIRECTORY 0#define IMAGE_FILE_IMPORT_DIRECTORY 1#define IMAGE_FILE_RESOURCE_DIRECTORY 2#define IMAGE_FILE_EXCEPTION_DIRECTORY 3#define IMAGE_FILE_SECURITY_DIRECTORY 4#define IMAGE_FILE_BASE_RELOCATION_TABLE 5#define IMAGE_FILE_DEBUG_DIRECTORY 6#define IMAGE_FILE_DESCRIPTION_STRING 7#define IMAGE_FILE_MACHINE_VALUE 8 /* Mips */#define IMAGE_FILE_THREAD_LOCAL_STORAGE 9#define IMAGE_FILE_CALLBACK_DIRECTORY 10/* Directory Entries, indices into the DataDirectory array */#define IMAGE_DIRECTORY_ENTRY_EXPORT 0#define IMAGE_DIRECTORY_ENTRY_IMPORT 1#define IMAGE_DIRECTORY_ENTRY_RESOURCE 2#define IMAGE_DIRECTORY_ENTRY_EXCEPTION 3#define IMAGE_DIRECTORY_ENTRY_SECURITY 4#define IMAGE_DIRECTORY_ENTRY_BASERELOC 5#define IMAGE_DIRECTORY_ENTRY_DEBUG 6#define IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7#define IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8 /* (MIPS GP) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -