⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winnt.h

📁 coreavc for linux in unix_linux
💻 H
📖 第 1 页 / 共 5 页
字号:
#define CONTEXT_CONTROL         0x0001#define CONTEXT_FLOATING_POINT  0x0002#define CONTEXT_INTEGER         0x0004#define CONTEXT_DEBUG_REGISTERS 0x0008#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)typedef struct{    /* These are selected by CONTEXT_FLOATING_POINT */    double Fpr0;    double Fpr1;    double Fpr2;    double Fpr3;    double Fpr4;    double Fpr5;    double Fpr6;    double Fpr7;    double Fpr8;    double Fpr9;    double Fpr10;    double Fpr11;    double Fpr12;    double Fpr13;    double Fpr14;    double Fpr15;    double Fpr16;    double Fpr17;    double Fpr18;    double Fpr19;    double Fpr20;    double Fpr21;    double Fpr22;    double Fpr23;    double Fpr24;    double Fpr25;    double Fpr26;    double Fpr27;    double Fpr28;    double Fpr29;    double Fpr30;    double Fpr31;    double Fpscr;    /* These are selected by CONTEXT_INTEGER */    DWORD Gpr0;    DWORD Gpr1;    DWORD Gpr2;    DWORD Gpr3;    DWORD Gpr4;    DWORD Gpr5;    DWORD Gpr6;    DWORD Gpr7;    DWORD Gpr8;    DWORD Gpr9;    DWORD Gpr10;    DWORD Gpr11;    DWORD Gpr12;    DWORD Gpr13;    DWORD Gpr14;    DWORD Gpr15;    DWORD Gpr16;    DWORD Gpr17;    DWORD Gpr18;    DWORD Gpr19;    DWORD Gpr20;    DWORD Gpr21;    DWORD Gpr22;    DWORD Gpr23;    DWORD Gpr24;    DWORD Gpr25;    DWORD Gpr26;    DWORD Gpr27;    DWORD Gpr28;    DWORD Gpr29;    DWORD Gpr30;    DWORD Gpr31;    DWORD Cr;    DWORD Xer;    /* These are selected by CONTEXT_CONTROL */    DWORD Msr;    DWORD Iar;    DWORD Lr;    DWORD Ctr;    DWORD ContextFlags;    DWORD Fill[3];    /* These are selected by CONTEXT_DEBUG_REGISTERS */    DWORD Dr0;    DWORD Dr1;    DWORD Dr2;    DWORD Dr3;    DWORD Dr4;    DWORD Dr5;    DWORD Dr6;    DWORD Dr7;} CONTEXT;typedef struct STACK_FRAME_HEADER{    DWORD BackChain;    DWORD GlueSaved1;    DWORD GlueSaved2;    DWORD Reserved1;    DWORD Spare1;    DWORD Spare2;    DWORD Parameter0;    DWORD Parameter1;    DWORD Parameter2;    DWORD Parameter3;    DWORD Parameter4;    DWORD Parameter5;    DWORD Parameter6;    DWORD Parameter7;} STACK_FRAME_HEADER,*PSTACK_FRAME_HEADER;#endif  /* __PPC__ */#ifdef __sparc__/*  * FIXME:   * * There is no official CONTEXT structure defined for the SPARC  * architecture, so I just made one up. * * This structure is valid only for 32-bit SPARC architectures, * not for 64-bit SPARC. * * Note that this structure contains only the 'top-level' registers; * the rest of the register window chain is not visible. * * The layout follows the Solaris 'prgregset_t' structure. *  */ #define CONTEXT_SPARC            0x10000000#define CONTEXT_CONTROL         (CONTEXT_SPARC | 0x00000001)#define CONTEXT_FLOATING_POINT  (CONTEXT_SPARC | 0x00000002)#define CONTEXT_INTEGER         (CONTEXT_SPARC | 0x00000004)#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_FLOATING_POINT | CONTEXT_INTEGER)typedef struct CONTEXT{    DWORD ContextFlags;    /* These are selected by CONTEXT_INTEGER */    DWORD g0;    DWORD g1;    DWORD g2;    DWORD g3;    DWORD g4;    DWORD g5;    DWORD g6;    DWORD g7;    DWORD o0;    DWORD o1;    DWORD o2;    DWORD o3;    DWORD o4;    DWORD o5;    DWORD o6;    DWORD o7;    DWORD l0;    DWORD l1;    DWORD l2;    DWORD l3;    DWORD l4;    DWORD l5;    DWORD l6;    DWORD l7;    DWORD i0;    DWORD i1;    DWORD i2;    DWORD i3;    DWORD i4;    DWORD i5;    DWORD i6;    DWORD i7;    /* These are selected by CONTEXT_CONTROL */    DWORD psr;    DWORD pc;    DWORD npc;    DWORD y;    DWORD wim;    DWORD tbr;    /* FIXME: floating point registers missing */} CONTEXT;#endif  /* __sparc__ */#if !defined(CONTEXT_FULL) && !defined(RC_INVOKED)#error You need to define a CONTEXT for your CPU#endiftypedef CONTEXT *PCONTEXT;typedef HANDLE *PHANDLE;/* Macros for easier access to i386 context registers */#define EAX_reg(context)     ((context)->Eax)#define EBX_reg(context)     ((context)->Ebx)#define ECX_reg(context)     ((context)->Ecx)#define EDX_reg(context)     ((context)->Edx)#define ESI_reg(context)     ((context)->Esi)#define EDI_reg(context)     ((context)->Edi)#define EBP_reg(context)     ((context)->Ebp)#define CS_reg(context)      ((context)->SegCs)#define DS_reg(context)      ((context)->SegDs)#define ES_reg(context)      ((context)->SegEs)#define FS_reg(context)      ((context)->SegFs)#define GS_reg(context)      ((context)->SegGs)#define SS_reg(context)      ((context)->SegSs)#define EFL_reg(context)     ((context)->EFlags)#define EIP_reg(context)     ((context)->Eip)#define ESP_reg(context)     ((context)->Esp)#define AX_reg(context)      (*(WORD*)&EAX_reg(context))#define BX_reg(context)      (*(WORD*)&EBX_reg(context))#define CX_reg(context)      (*(WORD*)&ECX_reg(context))#define DX_reg(context)      (*(WORD*)&EDX_reg(context))#define SI_reg(context)      (*(WORD*)&ESI_reg(context))#define DI_reg(context)      (*(WORD*)&EDI_reg(context))#define BP_reg(context)      (*(WORD*)&EBP_reg(context))#define AL_reg(context)      (*(BYTE*)&EAX_reg(context))#define AH_reg(context)      (*((BYTE*)&EAX_reg(context)+1))#define BL_reg(context)      (*(BYTE*)&EBX_reg(context))#define BH_reg(context)      (*((BYTE*)&EBX_reg(context)+1))#define CL_reg(context)      (*(BYTE*)&ECX_reg(context))#define CH_reg(context)      (*((BYTE*)&ECX_reg(context)+1))#define DL_reg(context)      (*(BYTE*)&EDX_reg(context))#define DH_reg(context)      (*((BYTE*)&EDX_reg(context)+1))                            #define SET_CFLAG(context)   (EFL_reg(context) |= 0x0001)#define RESET_CFLAG(context) (EFL_reg(context) &= ~0x0001)#define SET_ZFLAG(context)   (EFL_reg(context) |= 0x0040)#define RESET_ZFLAG(context) (EFL_reg(context) &= ~0x0040)#define ISV86(context)       (EFL_reg(context) & 0x00020000)#define V86BASE(context)     ((context)->Dr7) /* ugly *//* Macros to retrieve the current context */#ifdef __i386__#ifdef NEED_UNDERSCORE_PREFIX# define ASM_NAME(name) "_" name#else# define ASM_NAME(name) name#endif#ifdef __GNUC__# define ASM_GLOBAL_FUNC(name,code) \      __asm__( ".align 4\n\t" \               ".globl " ASM_NAME(#name) "\n\t" \               ".type " ASM_NAME(#name) ",@function\n" \               ASM_NAME(#name) ":\n\t" \               code );#else  /* __GNUC__ */# define ASM_GLOBAL_FUNC(name,code) \      void asm_dummy_##name(void) { \          asm( ".align 4\n\t" \               ".globl " ASM_NAME(#name) "\n\t" \               ".type " ASM_NAME(#name) ",@function\n" \               ASM_NAME(#name) ":\n\t" \               code ); \      }#endif  /* __GNUC__ */#define DEFINE_REGS_ENTRYPOINT( name, fn, args ) \    ASM_GLOBAL_FUNC( name, \                     "call " ASM_NAME("CALL32_Regs") "\n\t" \                     ".long " ASM_NAME(#fn) "\n\t" \                     ".byte " #args ", " #args )#define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \  DEFINE_REGS_ENTRYPOINT( name, fn, 0 )#define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \  DEFINE_REGS_ENTRYPOINT( name, fn, 4 )#define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \  DEFINE_REGS_ENTRYPOINT( name, fn, 8 )#define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \  DEFINE_REGS_ENTRYPOINT( name, fn, 12 )#define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \  DEFINE_REGS_ENTRYPOINT( name, fn, 16 )#endif  /* __i386__ */#ifdef __sparc__/* FIXME: use getcontext() to retrieve full context */#define GET_CONTEXT \    CONTEXT context;   \    do { memset(&context, 0, sizeof(CONTEXT));            \         context.ContextFlags = CONTEXT_CONTROL;          \         context.pc = (DWORD)__builtin_return_address(0); \       } while (0)#define DEFINE_REGS_ENTRYPOINT_0( name, fn ) \  void WINAPI name ( void ) \  { GET_CONTEXT; fn( &context ); }#define DEFINE_REGS_ENTRYPOINT_1( name, fn, t1 ) \  void WINAPI name ( t1 a1 ) \  { GET_CONTEXT; fn( a1, &context ); }#define DEFINE_REGS_ENTRYPOINT_2( name, fn, t1, t2 ) \  void WINAPI name ( t1 a1, t2 a2 ) \  { GET_CONTEXT; fn( a1, a2, &context ); }#define DEFINE_REGS_ENTRYPOINT_3( name, fn, t1, t2, t3 ) \  void WINAPI name ( t1 a1, t2 a2, t3 a3 ) \  { GET_CONTEXT; fn( a1, a2, a3, &context ); }#define DEFINE_REGS_ENTRYPOINT_4( name, fn, t1, t2, t3, t4 ) \  void WINAPI name ( t1 a1, t2 a2, t3 a3, t4 a4 ) \  { GET_CONTEXT; fn( a1, a2, a3, a4, &context ); }#endif /* __sparc__ */#ifndef DEFINE_REGS_ENTRYPOINT_0#error You need to define DEFINE_REGS_ENTRYPOINT macros for your CPU#endif#ifdef __i386__# define GET_IP(context) ((LPVOID)(context)->Eip)#endif#ifdef __sparc__# define GET_IP(context) ((LPVOID)(context)->pc)#endif #if !defined(GET_IP) && !defined(RC_INVOKED)# error You must define GET_IP for this CPU#endif/* * Exception codes */#define STATUS_SUCCESS                   0x00000000#define STATUS_WAIT_0                    0x00000000#define STATUS_ABANDONED_WAIT_0          0x00000080#define STATUS_USER_APC                  0x000000C0#define STATUS_TIMEOUT                   0x00000102#define STATUS_PENDING                   0x00000103#define STATUS_GUARD_PAGE_VIOLATION      0x80000001    #define STATUS_DATATYPE_MISALIGNMENT     0x80000002#define STATUS_BREAKPOINT                0x80000003#define STATUS_SINGLE_STEP               0x80000004#define	STATUS_BUFFER_OVERFLOW           0x80000005#define STATUS_NO_MORE_FILES             0x80000006#define STATUS_WAKE_SYSTEM_DEBUGGER      0x80000007#define STATUS_HANDLES_CLOSED            0x8000000A#define STATUS_NO_INHERITANCE            0x8000000B#define STATUS_GUID_SUBSTITUTION_MADE    0x8000000C#define STATUS_PARTIAL_COPY              0x8000000D#define STATUS_DEVICE_PAPER_EMPTY        0x8000000E#define STATUS_DEVICE_POWERED_OFF        0x8000000F#define STATUS_DEVICE_OFF_LINE           0x80000010#define STATUS_DEVICE_BUSY               0x80000011#define STATUS_NO_MORE_EAS               0x80000012#define STATUS_INVALID_EA_NAME           0x80000013#define STATUS_EA_LIST_INCONSISTENT      0x80000014#define STATUS_INVALID_EA_FLAG           0x80000015#define STATUS_VERIFY_REQUIRED           0x80000016#define STATUS_EXTRANEOUS_INFORMATION    0x80000017#define STATUS_RXACT_COMMIT_NECESSARY    0x80000018#define STATUS_NO_MORE_ENTRIES           0x8000001A#define STATUS_FILEMARK_DETECTED         0x8000001B#define STATUS_MEDIA_CHANGED             0x8000001C#define STATUS_BUS_RESET                 0x8000001D#define STATUS_END_OF_MEDIA              0x8000001E#define STATUS_BEGINNING_OF_MEDIA        0x8000001F#define STATUS_MEDIA_CHECK               0x80000020#define STATUS_SETMARK_DETECTED          0x80000021#define STATUS_NO_DATA_DETECTED          0x80000022#define STATUS_REDIRECTOR_HAS_OPEN_HANDLES 0x80000023#define STATUS_SERVER_HAS_OPEN_HANDLES   0x80000024#define STATUS_ALREADY_DISCONNECTED      0x80000025#define STATUS_LONGJUMP                  0x80000026#define STATUS_UNSUCCESSFUL              0xC0000001#define STATUS_NOT_IMPLEMENTED           0xC0000002#define STATUS_INVALID_INFO_CLASS        0xC0000003#define STATUS_INFO_LENGTH_MISMATCH      0xC0000004#define STATUS_ACCESS_VIOLATION          0xC0000005#define STATUS_IN_PAGE_ERROR             0xC0000006#define STATUS_PAGEFILE_QUOTA            0xC0000007#define STATUS_INVALID_HANDLE            0xC0000008#define STATUS_BAD_INITIAL_STACK         0xC0000009#define STATUS_BAD_INITIAL_PC            0xC000000A#define STATUS_INVALID_CID               0xC000000B#define STATUS_TIMER_NOT_CANCELED        0xC000000C#define STATUS_INVALID_PARAMETER         0xC000000D#define STATUS_NO_SUCH_DEVICE            0xC000000E#define STATUS_NO_SUCH_FILE              0xC000000F#define STATUS_INVALID_DEVICE_REQUEST    0xC0000010#define STATUS_END_OF_FILE               0xC0000011#define STATUS_WRONG_VOLUME              0xC0000012#define STATUS_NO_MEDIA_IN_DEVICE        0xC0000013#define STATUS_UNRECOGNIZED_MEDIA        0xC0000014#define STATUS_NONEXISTENT_SECTOR        0xC0000015#define STATUS_MORE_PROCESSING_REQUIRED  0xC0000016#define STATUS_NO_MEMORY                 0xC0000017#define STATUS_CONFLICTING_ADDRESSES     0xC0000018#define STATUS_NOT_MAPPED_VIEW           0xC0000019#define STATUS_UNABLE_TO_FREE_VM         0xC000001A#define STATUS_UNABLE_TO_DELETE_SECTION  0xC000001B#define STATUS_INVALID_SYSTEM_SERVICE    0xC000001C#define STATUS_ILLEGAL_INSTRUCTION       0xC000001D#define STATUS_INVALID_LOCK_SEQUENCE     0xC000001E#define STATUS_INVALID_VIEW_SIZE         0xC000001F#define STATUS_INVALID_FILE_FOR_SECTION  0xC0000020#define STATUS_ALREADY_COMMITTED         0xC0000021

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -