@@ -260,10 +260,6 @@ pub const WAIT_OBJECT_0: DWORD = 0x00000000;
260
260
pub const WAIT_TIMEOUT : DWORD = 258 ;
261
261
pub const WAIT_FAILED : DWORD = 0xFFFFFFFF ;
262
262
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
-
267
263
pub const PIPE_ACCESS_INBOUND : DWORD = 0x00000001 ;
268
264
pub const PIPE_ACCESS_OUTBOUND : DWORD = 0x00000002 ;
269
265
pub const FILE_FLAG_FIRST_PIPE_INSTANCE : DWORD = 0x00080000 ;
@@ -448,25 +444,6 @@ pub struct REPARSE_MOUNTPOINT_DATA_BUFFER {
448
444
pub ReparseTarget : WCHAR ,
449
445
}
450
446
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
-
470
447
#[ repr( C ) ]
471
448
pub struct GUID {
472
449
pub Data1 : DWORD ,
@@ -549,8 +526,6 @@ pub enum ADDRESS_MODE {
549
526
AddrModeFlat ,
550
527
}
551
528
552
- pub enum CONTEXT { }
553
-
554
529
#[ repr( C ) ]
555
530
pub struct SOCKADDR_STORAGE_LH {
556
531
pub ss_family : ADDRESS_FAMILY ,
@@ -635,6 +610,31 @@ pub struct timeval {
635
610
// Functions forbidden when targeting UWP
636
611
#[ cfg( not( target_vendor = "uwp" ) ) ]
637
612
ifdef ! {
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
+
638
638
#[ repr( C ) ]
639
639
#[ derive( Copy , Clone ) ]
640
640
pub struct CONSOLE_READCONSOLE_CONTROL {
@@ -698,6 +698,9 @@ ifdef! {
698
698
pub fn SetHandleInformation ( hObject: HANDLE ,
699
699
dwMask: DWORD ,
700
700
dwFlags: DWORD ) -> BOOL ;
701
+ pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
702
+ VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
703
+ -> LPVOID ;
701
704
pub fn CreateHardLinkW ( lpSymlinkFileName: LPCWSTR ,
702
705
lpTargetFileName: LPCWSTR ,
703
706
lpSecurityAttributes: LPSECURITY_ATTRIBUTES )
@@ -806,9 +809,6 @@ extern "system" {
806
809
lpData : LPVOID ,
807
810
pbCancel : LPBOOL ,
808
811
dwCopyFlags : DWORD ) -> BOOL ;
809
- pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
810
- VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
811
- -> LPVOID ;
812
812
pub fn FormatMessageW ( flags : DWORD ,
813
813
lpSrc : LPVOID ,
814
814
msgId : DWORD ,
@@ -1017,6 +1017,7 @@ compat_fn! {
1017
1017
_dwFlags: DWORD ) -> DWORD {
1018
1018
SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
1019
1019
}
1020
+ #[ cfg( not( target_vendor = "uwp" ) ) ]
1020
1021
pub fn SetThreadStackGuarantee ( _size: * mut c_ulong) -> BOOL {
1021
1022
SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
1022
1023
}
0 commit comments