@@ -286,6 +286,12 @@ pub const STACK_SIZE_PARAM_IS_A_RESERVATION: DWORD = 0x00010000;
286
286
287
287
pub const HEAP_ZERO_MEMORY : DWORD = 0x00000008 ;
288
288
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
+
289
295
#[ repr( C ) ]
290
296
#[ cfg( not( target_pointer_width = "64" ) ) ]
291
297
pub struct WSADATA {
@@ -625,24 +631,25 @@ pub struct timeval {
625
631
pub tv_usec : c_long ,
626
632
}
627
633
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
+
628
648
// Functions forbidden when targeting UWP
629
649
cfg_if:: cfg_if! {
630
650
if #[ cfg( not( target_vendor = "uwp" ) ) ] {
631
651
pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
632
652
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 { }
646
653
647
654
#[ repr( C ) ]
648
655
pub struct EXCEPTION_POINTERS {
@@ -1027,6 +1034,19 @@ extern "system" {
1027
1034
pub fn HeapAlloc ( hHeap : HANDLE , dwFlags : DWORD , dwBytes : SIZE_T ) -> LPVOID ;
1028
1035
pub fn HeapReAlloc ( hHeap : HANDLE , dwFlags : DWORD , lpMem : LPVOID , dwBytes : SIZE_T ) -> LPVOID ;
1029
1036
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
+ ) ;
1030
1050
}
1031
1051
1032
1052
// Functions that aren't available on every version of Windows that we support,
0 commit comments