共用方式為


CONTEXT 結構 (winnt.h)

包含處理器特定的緩存器數據。 系統會使用 CONTEXT 結構來執行各種內部作業。 如需每個處理器架構的這個結構定義,請參閱頭檔 WinNT.h。

語法

typedef struct _CONTEXT {
  DWORD64 P1Home;
  DWORD64 P2Home;
  DWORD64 P3Home;
  DWORD64 P4Home;
  DWORD64 P5Home;
  DWORD64 P6Home;
  DWORD   ContextFlags;
  DWORD   MxCsr;
  WORD    SegCs;
  WORD    SegDs;
  WORD    SegEs;
  WORD    SegFs;
  WORD    SegGs;
  WORD    SegSs;
  DWORD   EFlags;
  DWORD64 Dr0;
  DWORD64 Dr1;
  DWORD64 Dr2;
  DWORD64 Dr3;
  DWORD64 Dr6;
  DWORD64 Dr7;
  DWORD64 Rax;
  DWORD64 Rcx;
  DWORD64 Rdx;
  DWORD64 Rbx;
  DWORD64 Rsp;
  DWORD64 Rbp;
  DWORD64 Rsi;
  DWORD64 Rdi;
  DWORD64 R8;
  DWORD64 R9;
  DWORD64 R10;
  DWORD64 R11;
  DWORD64 R12;
  DWORD64 R13;
  DWORD64 R14;
  DWORD64 R15;
  DWORD64 Rip;
  union {
    XMM_SAVE_AREA32 FltSave;
    NEON128         Q[16];
    ULONGLONG       D[32];
    struct {
      M128A Header[2];
      M128A Legacy[8];
      M128A Xmm0;
      M128A Xmm1;
      M128A Xmm2;
      M128A Xmm3;
      M128A Xmm4;
      M128A Xmm5;
      M128A Xmm6;
      M128A Xmm7;
      M128A Xmm8;
      M128A Xmm9;
      M128A Xmm10;
      M128A Xmm11;
      M128A Xmm12;
      M128A Xmm13;
      M128A Xmm14;
      M128A Xmm15;
    } DUMMYSTRUCTNAME;
    DWORD           S[32];
  } DUMMYUNIONNAME;
  M128A   VectorRegister[26];
  DWORD64 VectorControl;
  DWORD64 DebugControl;
  DWORD64 LastBranchToRip;
  DWORD64 LastBranchFromRip;
  DWORD64 LastExceptionToRip;
  DWORD64 LastExceptionFromRip;
} CONTEXT, *PCONTEXT;

成員

P1Home

P2Home

P3Home

P4Home

P5Home

P6Home

ContextFlags

MxCsr

SegCs

SegDs

SegEs

SegFs

SegGs

SegSs

EFlags

Dr0

Dr1

Dr2

Dr3

Dr6

Dr7

Rax

Rcx

Rdx

Rbx

Rsp

Rbp

Rsi

Rdi

R8

R9

R10

R11

R12

R13

R14

R15

Rip

DUMMYUNIONNAME

DUMMYUNIONNAME.FltSave

DUMMYUNIONNAME.Q[16]

DUMMYUNIONNAME.D[32]

DUMMYUNIONNAME.DUMMYSTRUCTNAME

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Header[2]

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Legacy[8]

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm0

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm1

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm2

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm3

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm4

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm5

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm6

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm7

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm8

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm9

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm10

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm11

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm12

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm13

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm14

DUMMYUNIONNAME.DUMMYSTRUCTNAME.Xmm15

DUMMYUNIONNAME.S[32]

VectorRegister[26]

VectorControl

DebugControl

LastBranchToRip

LastBranchFromRip

LastExceptionToRip

LastExceptionFromRip

規格需求

需求
最低支援的用戶端 Windows XP [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2003 [僅限桌面應用程式]
標頭 winnt.h (包含 Windows.h)

另請參閱

偵錯結構

GetThreadContext

GetXStateFeaturesMask

SetThreadContext

WOW64_CONTEXT