@@ -260,10 +260,6 @@ pub const WAIT_OBJECT_0: DWORD = 0x00000000;
260260pub const WAIT_TIMEOUT : DWORD = 258 ;
261261pub const WAIT_FAILED : DWORD = 0xFFFFFFFF ;
262262
263- pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
264- pub const EXCEPTION_STACK_OVERFLOW : DWORD = 0xc00000fd ;
265- pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
266-
267263pub const PIPE_ACCESS_INBOUND : DWORD = 0x00000001 ;
268264pub const PIPE_ACCESS_OUTBOUND : DWORD = 0x00000002 ;
269265pub const FILE_FLAG_FIRST_PIPE_INSTANCE : DWORD = 0x00080000 ;
@@ -448,25 +444,6 @@ pub struct REPARSE_MOUNTPOINT_DATA_BUFFER {
448444 pub ReparseTarget : WCHAR ,
449445}
450446
451- #[ repr( C ) ]
452- pub struct EXCEPTION_RECORD {
453- pub ExceptionCode : DWORD ,
454- pub ExceptionFlags : DWORD ,
455- pub ExceptionRecord : * mut EXCEPTION_RECORD ,
456- pub ExceptionAddress : LPVOID ,
457- pub NumberParameters : DWORD ,
458- pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ]
459- }
460-
461- #[ repr( C ) ]
462- pub struct EXCEPTION_POINTERS {
463- pub ExceptionRecord : * mut EXCEPTION_RECORD ,
464- pub ContextRecord : * mut CONTEXT ,
465- }
466-
467- pub type PVECTORED_EXCEPTION_HANDLER = extern "system"
468- fn ( ExceptionInfo : * mut EXCEPTION_POINTERS ) -> LONG ;
469-
470447#[ repr( C ) ]
471448pub struct GUID {
472449 pub Data1 : DWORD ,
@@ -549,8 +526,6 @@ pub enum ADDRESS_MODE {
549526 AddrModeFlat ,
550527}
551528
552- pub enum CONTEXT { }
553-
554529#[ repr( C ) ]
555530pub struct SOCKADDR_STORAGE_LH {
556531 pub ss_family : ADDRESS_FAMILY ,
@@ -635,6 +610,31 @@ pub struct timeval {
635610// Functions forbidden when targeting UWP
636611#[ cfg( not( target_vendor = "uwp" ) ) ]
637612ifdef ! {
613+ pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
614+ pub const EXCEPTION_STACK_OVERFLOW : DWORD = 0xc00000fd ;
615+ pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
616+
617+ #[ repr( C ) ]
618+ pub struct EXCEPTION_RECORD {
619+ pub ExceptionCode : DWORD ,
620+ pub ExceptionFlags : DWORD ,
621+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
622+ pub ExceptionAddress : LPVOID ,
623+ pub NumberParameters : DWORD ,
624+ pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ]
625+ }
626+
627+ pub enum CONTEXT { }
628+
629+ #[ repr( C ) ]
630+ pub struct EXCEPTION_POINTERS {
631+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
632+ pub ContextRecord : * mut CONTEXT ,
633+ }
634+
635+ pub type PVECTORED_EXCEPTION_HANDLER = extern "system"
636+ fn ( ExceptionInfo : * mut EXCEPTION_POINTERS ) -> LONG ;
637+
638638 #[ repr( C ) ]
639639 #[ derive( Copy , Clone ) ]
640640 pub struct CONSOLE_READCONSOLE_CONTROL {
@@ -698,6 +698,9 @@ ifdef! {
698698 pub fn SetHandleInformation ( hObject: HANDLE ,
699699 dwMask: DWORD ,
700700 dwFlags: DWORD ) -> BOOL ;
701+ pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
702+ VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
703+ -> LPVOID ;
701704 pub fn CreateHardLinkW ( lpSymlinkFileName: LPCWSTR ,
702705 lpTargetFileName: LPCWSTR ,
703706 lpSecurityAttributes: LPSECURITY_ATTRIBUTES )
@@ -806,9 +809,6 @@ extern "system" {
806809 lpData : LPVOID ,
807810 pbCancel : LPBOOL ,
808811 dwCopyFlags : DWORD ) -> BOOL ;
809- pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
810- VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
811- -> LPVOID ;
812812 pub fn FormatMessageW ( flags : DWORD ,
813813 lpSrc : LPVOID ,
814814 msgId : DWORD ,
@@ -1017,6 +1017,7 @@ compat_fn! {
10171017 _dwFlags: DWORD ) -> DWORD {
10181018 SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
10191019 }
1020+ #[ cfg( not( target_vendor = "uwp" ) ) ]
10201021 pub fn SetThreadStackGuarantee ( _size: * mut c_ulong) -> BOOL {
10211022 SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
10221023 }
0 commit comments