@@ -286,6 +286,12 @@ pub const STACK_SIZE_PARAM_IS_A_RESERVATION: DWORD = 0x00010000;
286286
287287pub const HEAP_ZERO_MEMORY : DWORD = 0x00000008 ;
288288
289+ pub const PF_FASTFAIL_AVAILABLE : DWORD = 23 ;
290+
291+ pub const STATUS_FAIL_FAST_EXCEPTION : DWORD = 0xC0000602 ;
292+
293+ pub const EXCEPTION_NONCONTINUABLE : DWORD = 0x1 ;
294+
289295#[ repr( C ) ]
290296#[ cfg( not( target_pointer_width = "64" ) ) ]
291297pub struct WSADATA {
@@ -625,24 +631,25 @@ pub struct timeval {
625631 pub tv_usec : c_long ,
626632}
627633
634+ pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
635+
636+ #[ repr( C ) ]
637+ pub struct EXCEPTION_RECORD {
638+ pub ExceptionCode : DWORD ,
639+ pub ExceptionFlags : DWORD ,
640+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
641+ pub ExceptionAddress : LPVOID ,
642+ pub NumberParameters : DWORD ,
643+ pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ] ,
644+ }
645+
646+ pub enum CONTEXT { }
647+
628648// Functions forbidden when targeting UWP
629649cfg_if:: cfg_if! {
630650if #[ cfg( not( target_vendor = "uwp" ) ) ] {
631651 pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
632652 pub const EXCEPTION_STACK_OVERFLOW : DWORD = 0xc00000fd ;
633- pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
634-
635- #[ repr( C ) ]
636- pub struct EXCEPTION_RECORD {
637- pub ExceptionCode : DWORD ,
638- pub ExceptionFlags : DWORD ,
639- pub ExceptionRecord : * mut EXCEPTION_RECORD ,
640- pub ExceptionAddress : LPVOID ,
641- pub NumberParameters : DWORD ,
642- pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ]
643- }
644-
645- pub enum CONTEXT { }
646653
647654 #[ repr( C ) ]
648655 pub struct EXCEPTION_POINTERS {
@@ -1027,6 +1034,19 @@ extern "system" {
10271034 pub fn HeapAlloc ( hHeap : HANDLE , dwFlags : DWORD , dwBytes : SIZE_T ) -> LPVOID ;
10281035 pub fn HeapReAlloc ( hHeap : HANDLE , dwFlags : DWORD , lpMem : LPVOID , dwBytes : SIZE_T ) -> LPVOID ;
10291036 pub fn HeapFree ( hHeap : HANDLE , dwFlags : DWORD , lpMem : LPVOID ) -> BOOL ;
1037+
1038+ pub fn IsProcessorFeaturePresent ( ProcessorFeature : DWORD ) -> BOOL ;
1039+ pub fn RaiseException (
1040+ dwExceptionCode : DWORD ,
1041+ dwExceptionFlags : DWORD ,
1042+ nNumberOfArguments : DWORD ,
1043+ lpArguments : * const ULONG_PTR ,
1044+ ) ;
1045+ pub fn RaiseFailFastException (
1046+ pExceptionRecord : * const EXCEPTION_RECORD ,
1047+ pContextRecord : * const CONTEXT ,
1048+ dwFlags : DWORD ,
1049+ ) ;
10301050}
10311051
10321052// Functions that aren't available on every version of Windows that we support,
0 commit comments