diff --git a/src/windows.rs b/src/windows.rs index 43930153c..6b2cd6e90 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -346,15 +346,6 @@ ffi! { pub const INVALID_HANDLE_VALUE: HANDLE = -1isize as HANDLE; pub const MAX_MODULE_NAME32: usize = 255; pub const MAX_PATH: usize = 260; - pub const CONTEXT_i386: u32 = 0x10000; - pub const CONTEXT_CONTROL: u32 = CONTEXT_i386 | 0x01; // SS:SP, CS:IP, FLAGS, B; - pub const CONTEXT_INTEGER: u32 = CONTEXT_i386 | 0x02; // AX, BX, CX, DX, SI, D; - pub const CONTEXT_SEGMENTS: u32 = CONTEXT_i386 | 0x04; // DS, ES, FS, G; - pub const CONTEXT_FLOATING_POINT: u32 = CONTEXT_i386 | 0x08; // 387 stat; - pub const CONTEXT_DEBUG_REGISTERS: u32 = CONTEXT_i386 | 0x10; // DB 0-3,6,; - pub const CONTEXT_EXTENDED_REGISTERS: u32 = CONTEXT_i386 | 0x20; // cpu specific extension; - pub const CONTEXT_ALL: u32 = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS; - pub type DWORD = u32; pub type PDWORD = *mut u32; @@ -575,6 +566,18 @@ ffi! { pub RegisterArea: [u8; 80], pub Spare0: DWORD, } + + pub const CONTEXT_i386: DWORD = 0x00010000; + pub const CONTEXT_i486: DWORD = 0x00010000; + pub const CONTEXT_CONTROL: DWORD = CONTEXT_i386 | 0x00000001; + pub const CONTEXT_INTEGER: DWORD = CONTEXT_i386 | 0x00000002; + pub const CONTEXT_SEGMENTS: DWORD = CONTEXT_i386 | 0x00000004; + pub const CONTEXT_FLOATING_POINT: DWORD = CONTEXT_i386 | 0x00000008; + pub const CONTEXT_DEBUG_REGISTERS: DWORD = CONTEXT_i386 | 0x00000010; + pub const CONTEXT_EXTENDED_REGISTERS: DWORD = CONTEXT_i386 | 0x00000020; + pub const CONTEXT_FULL: DWORD = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS; + pub const CONTEXT_ALL: DWORD = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS + | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS | CONTEXT_EXTENDED_REGISTERS; } #[cfg(target_arch = "x86_64")] @@ -642,6 +645,16 @@ ffi! { pub Low: u64, pub High: i64, } + + pub const CONTEXT_AMD64: DWORD = 0x00100000; + pub const CONTEXT_CONTROL: DWORD = CONTEXT_AMD64 | 0x00000001; + pub const CONTEXT_INTEGER: DWORD = CONTEXT_AMD64 | 0x00000002; + pub const CONTEXT_SEGMENTS: DWORD = CONTEXT_AMD64 | 0x00000004; + pub const CONTEXT_FLOATING_POINT: DWORD = CONTEXT_AMD64 | 0x00000008; + pub const CONTEXT_DEBUG_REGISTERS: DWORD = CONTEXT_AMD64 | 0x00000010; + pub const CONTEXT_FULL: DWORD = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_FLOATING_POINT; + pub const CONTEXT_ALL: DWORD = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS + | CONTEXT_FLOATING_POINT | CONTEXT_DEBUG_REGISTERS; } #[repr(C)]