-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise noncontinuable exception when aborting on earlier Windows versions
- Loading branch information
Showing
4 changed files
with
129 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#![allow(nonstandard_style)] | ||
|
||
use libc::{c_int, c_ulong, c_void}; | ||
|
||
pub type DWORD = c_ulong; | ||
pub type BOOL = c_int; | ||
|
||
pub type LPVOID = *mut c_void; | ||
|
||
pub const FALSE: BOOL = 0; | ||
|
||
pub const PF_FASTFAIL_AVAILABLE: DWORD = 23; | ||
|
||
pub const EXCEPTION_MAXIMUM_PARAMETERS: usize = 15; | ||
|
||
#[repr(C)] | ||
pub struct EXCEPTION_RECORD { | ||
pub ExceptionCode: DWORD, | ||
pub ExceptionFlags: DWORD, | ||
pub ExceptionRecord: *mut EXCEPTION_RECORD, | ||
pub ExceptionAddress: LPVOID, | ||
pub NumberParameters: DWORD, | ||
pub ExceptionInformation: [LPVOID; EXCEPTION_MAXIMUM_PARAMETERS], | ||
} | ||
|
||
pub enum CONTEXT {} | ||
|
||
extern "system" { | ||
pub fn IsProcessorFeaturePresent(ProcessorFeature: DWORD) -> BOOL; | ||
pub fn RaiseFailFastException( | ||
pExceptionRecord: *const EXCEPTION_RECORD, | ||
pContextRecord: *const CONTEXT, | ||
dwFlags: DWORD, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters