@@ -256,10 +256,6 @@ pub const WAIT_OBJECT_0: DWORD = 0x00000000;
256
256
pub const WAIT_TIMEOUT : DWORD = 258 ;
257
257
pub const WAIT_FAILED : DWORD = 0xFFFFFFFF ;
258
258
259
- pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
260
- pub const EXCEPTION_STACK_OVERFLOW : DWORD = 0xc00000fd ;
261
- pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
262
-
263
259
pub const PIPE_ACCESS_INBOUND : DWORD = 0x00000001 ;
264
260
pub const PIPE_ACCESS_OUTBOUND : DWORD = 0x00000002 ;
265
261
pub const FILE_FLAG_FIRST_PIPE_INSTANCE : DWORD = 0x00080000 ;
@@ -444,25 +440,6 @@ pub struct REPARSE_MOUNTPOINT_DATA_BUFFER {
444
440
pub ReparseTarget : WCHAR ,
445
441
}
446
442
447
- #[ repr( C ) ]
448
- pub struct EXCEPTION_RECORD {
449
- pub ExceptionCode : DWORD ,
450
- pub ExceptionFlags : DWORD ,
451
- pub ExceptionRecord : * mut EXCEPTION_RECORD ,
452
- pub ExceptionAddress : LPVOID ,
453
- pub NumberParameters : DWORD ,
454
- pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ]
455
- }
456
-
457
- #[ repr( C ) ]
458
- pub struct EXCEPTION_POINTERS {
459
- pub ExceptionRecord : * mut EXCEPTION_RECORD ,
460
- pub ContextRecord : * mut CONTEXT ,
461
- }
462
-
463
- pub type PVECTORED_EXCEPTION_HANDLER = extern "system"
464
- fn ( ExceptionInfo : * mut EXCEPTION_POINTERS ) -> LONG ;
465
-
466
443
#[ repr( C ) ]
467
444
pub struct GUID {
468
445
pub Data1 : DWORD ,
@@ -545,8 +522,6 @@ pub enum ADDRESS_MODE {
545
522
AddrModeFlat ,
546
523
}
547
524
548
- pub enum CONTEXT { }
549
-
550
525
#[ repr( C ) ]
551
526
pub struct SOCKADDR_STORAGE_LH {
552
527
pub ss_family : ADDRESS_FAMILY ,
@@ -631,6 +606,31 @@ pub struct timeval {
631
606
// Functions forbidden when targeting UWP
632
607
cfg_if:: cfg_if! {
633
608
if #[ cfg( not( target_vendor = "uwp" ) ) ] {
609
+ pub const EXCEPTION_CONTINUE_SEARCH : LONG = 0 ;
610
+ pub const EXCEPTION_STACK_OVERFLOW : DWORD = 0xc00000fd ;
611
+ pub const EXCEPTION_MAXIMUM_PARAMETERS : usize = 15 ;
612
+
613
+ #[ repr( C ) ]
614
+ pub struct EXCEPTION_RECORD {
615
+ pub ExceptionCode : DWORD ,
616
+ pub ExceptionFlags : DWORD ,
617
+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
618
+ pub ExceptionAddress : LPVOID ,
619
+ pub NumberParameters : DWORD ,
620
+ pub ExceptionInformation : [ LPVOID ; EXCEPTION_MAXIMUM_PARAMETERS ]
621
+ }
622
+
623
+ pub enum CONTEXT { }
624
+
625
+ #[ repr( C ) ]
626
+ pub struct EXCEPTION_POINTERS {
627
+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
628
+ pub ContextRecord : * mut CONTEXT ,
629
+ }
630
+
631
+ pub type PVECTORED_EXCEPTION_HANDLER = extern "system"
632
+ fn ( ExceptionInfo : * mut EXCEPTION_POINTERS ) -> LONG ;
633
+
634
634
#[ repr( C ) ]
635
635
#[ derive( Copy , Clone ) ]
636
636
pub struct CONSOLE_READCONSOLE_CONTROL {
@@ -694,6 +694,9 @@ if #[cfg(not(target_vendor = "uwp"))] {
694
694
pub fn SetHandleInformation ( hObject: HANDLE ,
695
695
dwMask: DWORD ,
696
696
dwFlags: DWORD ) -> BOOL ;
697
+ pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
698
+ VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
699
+ -> LPVOID ;
697
700
pub fn CreateHardLinkW ( lpSymlinkFileName: LPCWSTR ,
698
701
lpTargetFileName: LPCWSTR ,
699
702
lpSecurityAttributes: LPSECURITY_ATTRIBUTES )
@@ -804,9 +807,6 @@ extern "system" {
804
807
lpData : LPVOID ,
805
808
pbCancel : LPBOOL ,
806
809
dwCopyFlags : DWORD ) -> BOOL ;
807
- pub fn AddVectoredExceptionHandler ( FirstHandler : ULONG ,
808
- VectoredHandler : PVECTORED_EXCEPTION_HANDLER )
809
- -> LPVOID ;
810
810
pub fn FormatMessageW ( flags : DWORD ,
811
811
lpSrc : LPVOID ,
812
812
msgId : DWORD ,
@@ -1015,6 +1015,7 @@ compat_fn! {
1015
1015
_dwFlags: DWORD ) -> DWORD {
1016
1016
SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
1017
1017
}
1018
+ #[ cfg( not( target_vendor = "uwp" ) ) ]
1018
1019
pub fn SetThreadStackGuarantee ( _size: * mut c_ulong) -> BOOL {
1019
1020
SetLastError ( ERROR_CALL_NOT_IMPLEMENTED as DWORD ) ; 0
1020
1021
}
0 commit comments