@@ -5,6 +5,7 @@ windows_targets::link!("advapi32.dll" "system" fn OpenProcessToken(processhandle
55windows_targets:: link!( "advapi32.dll" "system" "SystemFunction036" fn RtlGenRandom ( randombuffer : * mut core:: ffi:: c_void, randombufferlength : u32 ) -> BOOLEAN ) ;
66windows_targets:: link!( "kernel32.dll" "system" fn AcquireSRWLockExclusive ( srwlock : * mut SRWLOCK ) ) ;
77windows_targets:: link!( "kernel32.dll" "system" fn AcquireSRWLockShared ( srwlock : * mut SRWLOCK ) ) ;
8+ windows_targets:: link!( "kernel32.dll" "system" fn AddVectoredExceptionHandler ( first : u32 , handler : PVECTORED_EXCEPTION_HANDLER ) -> * mut core:: ffi:: c_void) ;
89windows_targets:: link!( "kernel32.dll" "system" fn CancelIo ( hfile : HANDLE ) -> BOOL ) ;
910windows_targets:: link!( "kernel32.dll" "system" fn CloseHandle ( hobject : HANDLE ) -> BOOL ) ;
1011windows_targets:: link!( "kernel32.dll" "system" fn CompareStringOrdinal ( lpstring1 : PCWSTR , cchcount1 : i32 , lpstring2 : PCWSTR , cchcount2 : i32 , bignorecase : BOOL ) -> COMPARESTRING_RESULT ) ;
@@ -113,6 +114,7 @@ windows_targets::link!("ws2_32.dll" "system" fn WSAGetLastError() -> WSA_ERROR);
113114windows_targets:: link!( "ws2_32.dll" "system" fn WSARecv ( s : SOCKET , lpbuffers : * const WSABUF , dwbuffercount : u32 , lpnumberofbytesrecvd : * mut u32 , lpflags : * mut u32 , lpoverlapped : * mut OVERLAPPED , lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE ) -> i32 ) ;
114115windows_targets:: link!( "ws2_32.dll" "system" fn WSASend ( s : SOCKET , lpbuffers : * const WSABUF , dwbuffercount : u32 , lpnumberofbytessent : * mut u32 , dwflags : u32 , lpoverlapped : * mut OVERLAPPED , lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE ) -> i32 ) ;
115116windows_targets:: link!( "ws2_32.dll" "system" fn WSASocketW ( af : i32 , r#type : i32 , protocol : i32 , lpprotocolinfo : * const WSAPROTOCOL_INFOW , g : u32 , dwflags : u32 ) -> SOCKET ) ;
117+ windows_targets:: link!( "ws2_32.dll" "system" fn WSAStartup ( wversionrequested : u16 , lpwsadata : * mut WSADATA ) -> i32 ) ;
116118windows_targets:: link!( "ws2_32.dll" "system" fn accept( s : SOCKET , addr : * mut SOCKADDR , addrlen : * mut i32 ) -> SOCKET ) ;
117119windows_targets:: link!( "ws2_32.dll" "system" fn bind( s : SOCKET , name : * const SOCKADDR , namelen : i32 ) -> i32 ) ;
118120windows_targets:: link!( "ws2_32.dll" "system" fn closesocket( s : SOCKET ) -> i32 ) ;
@@ -2283,6 +2285,12 @@ pub type EXCEPTION_DISPOSITION = i32;
22832285pub const EXCEPTION_MAXIMUM_PARAMETERS : u32 = 15u32 ;
22842286#[ repr( C ) ]
22852287#[ derive( Clone , Copy ) ]
2288+ pub struct EXCEPTION_POINTERS {
2289+ pub ExceptionRecord : * mut EXCEPTION_RECORD ,
2290+ pub ContextRecord : * mut CONTEXT ,
2291+ }
2292+ #[ repr( C ) ]
2293+ #[ derive( Clone , Copy ) ]
22862294pub struct EXCEPTION_RECORD {
22872295 pub ExceptionCode : NTSTATUS ,
22882296 pub ExceptionFlags : u32 ,
@@ -2859,6 +2867,8 @@ pub type PTIMERAPCROUTINE = Option<
28592867 dwtimerhighvalue : u32 ,
28602868 ) ,
28612869> ;
2870+ pub type PVECTORED_EXCEPTION_HANDLER =
2871+ Option < unsafe extern "system" fn ( exceptioninfo : * mut EXCEPTION_POINTERS ) -> i32 > ;
28622872pub type PWSTR = * mut u16 ;
28632873pub const READ_CONTROL : FILE_ACCESS_RIGHTS = 131072u32 ;
28642874pub const REALTIME_PRIORITY_CLASS : PROCESS_CREATION_FLAGS = 256u32 ;
@@ -3283,5 +3293,19 @@ pub struct XSAVE_FORMAT {
32833293 pub XmmRegisters : [ M128A ; 8 ] ,
32843294 pub Reserved4 : [ u8 ; 224 ] ,
32853295}
3296+
3297+ #[ cfg( target_arch = "arm" ) ]
3298+ #[ repr( C ) ]
3299+ pub struct WSADATA {
3300+ pub wVersion : u16 ,
3301+ pub wHighVersion : u16 ,
3302+ pub szDescription : [ u8 ; 257 ] ,
3303+ pub szSystemStatus : [ u8 ; 129 ] ,
3304+ pub iMaxSockets : u16 ,
3305+ pub iMaxUdpDg : u16 ,
3306+ pub lpVendorInfo : PSTR ,
3307+ }
3308+ #[ cfg( target_arch = "arm" ) ]
3309+ pub enum CONTEXT { }
32863310// ignore-tidy-filelength
32873311use super :: windows_targets;
0 commit comments