winapi 0.2.2

Types and constants for WinAPI bindings. See README for list of crates providing function bindings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
//! definitions to be used with the WinSock 2 DLL and WinSock 2 applications.
//!
//! This header file corresponds to version 2.2.x of the WinSock API specification.
pub const WINSOCK_VERSION: ::WORD = 2 | (2 << 8);
pub type u_char = ::c_uchar;
pub type u_short = ::c_ushort;
pub type u_int = ::c_uint;
pub type u_long = ::c_ulong;
pub type u_int64 = ::__uint64;
pub type SOCKET = ::UINT_PTR;
pub type GROUP = ::c_uint;
pub const FD_SETSIZE: usize = 64;
pub const FD_MAX_EVENTS: usize = 10;
#[repr(C)] #[derive(Copy)]
pub struct fd_set {
    pub fd_count: u_int,
    pub fd_array: [SOCKET; FD_SETSIZE],
}
impl Clone for fd_set { fn clone(&self) -> fd_set { *self } }
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct timeval {
    pub tv_sec: ::c_long,
    pub tv_usec: ::c_long,
}

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct hostent {
    pub h_name: *mut ::c_char,
    pub h_aliases: *mut *mut ::c_char,
    pub h_addrtype: ::c_short,
    pub h_length: ::c_short,
    pub h_addr_list: *mut *mut ::c_char,
}

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct netent {
    pub n_name: *mut ::c_char,
    pub n_aliases: *mut *mut ::c_char,
    pub n_addrtype: ::c_short,
    pub n_net: u_long,
}

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct servent {
    pub s_name: *mut ::c_char,
    pub s_aliases: *mut *mut ::c_char,
    #[cfg(target_arch="x86")]
    pub s_port: ::c_short,
    #[cfg(target_arch="x86")]
    pub s_proto: *mut ::c_char,
    #[cfg(target_arch="x86_64")]
    pub s_proto: *mut ::c_char,
    #[cfg(target_arch="x86_64")]
    pub s_port: ::c_short,
}

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct protoent {
    pub p_name: *mut ::c_char,
    pub p_aliases: *mut *mut ::c_char,
    pub p_proto: ::c_short,
}

pub const WSADESCRIPTION_LEN: usize = 256;
pub const WSASYS_STATUS_LEN: usize = 128;
#[repr(C)] #[derive(Copy)]
pub struct WSADATA {
    pub wVersion: ::WORD,
    pub wHighVersion: ::WORD,
    #[cfg(target_arch="x86")]
    pub szDescription: [::c_char; WSADESCRIPTION_LEN + 1],
    #[cfg(target_arch="x86")]
    pub szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1],
    pub iMaxSockets: ::c_ushort,
    pub iMaxUdpDg: ::c_ushort,
    pub lpVendorInfo: *mut ::c_char,
    #[cfg(target_arch="x86_64")]
    pub szDescription: [::c_char; WSADESCRIPTION_LEN + 1],
    #[cfg(target_arch="x86_64")]
    pub szSystemStatus: [::c_char; WSASYS_STATUS_LEN + 1],
}
impl Clone for WSADATA { fn clone(&self) -> WSADATA { *self } }
pub type LPWSADATA = *mut WSADATA;

//391
pub const INVALID_SOCKET: SOCKET = !0;
pub const SOCKET_ERROR: ::c_int = -1;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct sockproto {
    pub sp_family: u_short,
    pub sp_protocol: u_short,
}

pub const PF_UNSPEC: ::c_int = ::AF_UNSPEC;
pub const PF_UNIX: ::c_int = ::AF_UNIX;
pub const PF_INET: ::c_int = ::AF_INET;
pub const PF_IMPLINK: ::c_int = ::AF_IMPLINK;
pub const PF_PUP: ::c_int = ::AF_PUP;
pub const PF_CHAOS: ::c_int = ::AF_CHAOS;
pub const PF_NS: ::c_int = ::AF_NS;
pub const PF_IPX: ::c_int = ::AF_IPX;
pub const PF_ISO: ::c_int = ::AF_ISO;
pub const PF_OSI: ::c_int = ::AF_OSI;
pub const PF_ECMA: ::c_int = ::AF_ECMA;
pub const PF_DATAKIT: ::c_int = ::AF_DATAKIT;
pub const PF_CCITT: ::c_int = ::AF_CCITT;
pub const PF_SNA: ::c_int = ::AF_SNA;
pub const PF_DECnet: ::c_int = ::AF_DECnet;
pub const PF_DLI: ::c_int = ::AF_DLI;
pub const PF_LAT: ::c_int = ::AF_LAT;
pub const PF_HYLINK: ::c_int = ::AF_HYLINK;
pub const PF_APPLETALK: ::c_int = ::AF_APPLETALK;
pub const PF_VOICEVIEW: ::c_int = ::AF_VOICEVIEW;
pub const PF_FIREFOX: ::c_int = ::AF_FIREFOX;
pub const PF_UNKNOWN1: ::c_int = ::AF_UNKNOWN1;
pub const PF_BAN: ::c_int = ::AF_BAN;
pub const PF_ATM: ::c_int = ::AF_ATM;
pub const PF_INET6: ::c_int = ::AF_INET6;
pub const PF_BTH: ::c_int = ::AF_BTH;
pub const PF_MAX: ::c_int = ::AF_MAX;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct linger {
    pub l_onoff: u_short,
    pub l_linger: u_short,
}

pub const SOMAXCONN: ::c_int = 0x7fffffff;

pub type WSAEVENT = ::HANDLE;
pub type LPWSAEVENT = ::LPHANDLE;
pub type WSAOVERLAPPED = ::OVERLAPPED;
pub type LPWSAOVERLAPPED = *mut ::OVERLAPPED;

pub const WSA_IO_PENDING: ::DWORD = ::ERROR_IO_PENDING;
pub const WSA_IO_INCOMPLETE: ::DWORD = ::ERROR_IO_INCOMPLETE;
pub const WSA_INVALID_HANDLE: ::DWORD = ::ERROR_INVALID_HANDLE;
pub const WSA_INVALID_PARAMETER: ::DWORD = ::ERROR_INVALID_PARAMETER;
pub const WSA_NOT_ENOUGH_MEMORY: ::DWORD = ::ERROR_NOT_ENOUGH_MEMORY;
pub const WSA_OPERATION_ABORTED: ::DWORD = ::ERROR_OPERATION_ABORTED;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct QOS {
    pub SendingFlowspec: ::FLOWSPEC,
    pub FLOWSPEC: ::FLOWSPEC,
    pub ProviderSpecific: ::WSABUF,
}
pub type LPQOS = *mut QOS;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANETWORKEVENTS {
    pub lNetworkEvents: ::c_long,
    pub iErrorCode: [::c_int; FD_MAX_EVENTS],
}
pub type LPWSANETWORKEVENTS = *mut WSANETWORKEVENTS;

pub const MAX_PROTOCOL_CHAIN: usize = 7;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAPROTOCOLCHAIN {
    pub ChainLen: ::c_int,
    pub ChainEntries: [::DWORD; MAX_PROTOCOL_CHAIN],
}
pub type LPWSAPROTOCOLCHAIN = *mut WSAPROTOCOLCHAIN;

pub const WSAPROTOCOL_LEN: usize = 255;
#[repr(C)] #[derive(Copy)]
pub struct WSAPROTOCOL_INFOA {
    pub dwServiceFlags1: ::DWORD,
    pub dwServiceFlags2: ::DWORD,
    pub dwServiceFlags3: ::DWORD,
    pub dwServiceFlags4: ::DWORD,
    pub dwServiceFlags5: ::DWORD,
    pub ProviderId: ::GUID,
    pub dwCatalogEntryId: ::DWORD,
    pub ProtocolChain: WSAPROTOCOLCHAIN,
    pub iVersion: ::c_int,
    pub iAddressFamily: ::c_int,
    pub iMaxSockAddr: ::c_int,
    pub iMinSockAddr: ::c_int,
    pub iSocketType: ::c_int,
    pub iProtocol: ::c_int,
    pub iProtocolMaxOffset: ::c_int,
    pub iNetworkByteOrder: ::c_int,
    pub iSecurityScheme: ::c_int,
    pub dwMessageSize: ::DWORD,
    pub dwProviderReserved: ::DWORD,
    pub szProtocol: [::CHAR; WSAPROTOCOL_LEN + 1],
}
impl Clone for WSAPROTOCOL_INFOA { fn clone(&self) -> WSAPROTOCOL_INFOA { *self } }
pub type LPWSAPROTOCOL_INFOA = *mut WSAPROTOCOL_INFOA;
#[repr(C)] #[derive(Copy)]
pub struct WSAPROTOCOL_INFOW {
    pub dwServiceFlags1: ::DWORD,
    pub dwServiceFlags2: ::DWORD,
    pub dwServiceFlags3: ::DWORD,
    pub dwServiceFlags4: ::DWORD,
    pub dwServiceFlags5: ::DWORD,
    pub ProviderId: ::GUID,
    pub dwCatalogEntryId: ::DWORD,
    pub ProtocolChain: WSAPROTOCOLCHAIN,
    pub iVersion: ::c_int,
    pub iAddressFamily: ::c_int,
    pub iMaxSockAddr: ::c_int,
    pub iMinSockAddr: ::c_int,
    pub iSocketType: ::c_int,
    pub iProtocol: ::c_int,
    pub iProtocolMaxOffset: ::c_int,
    pub iNetworkByteOrder: ::c_int,
    pub iSecurityScheme: ::c_int,
    pub dwMessageSize: ::DWORD,
    pub dwProviderReserved: ::DWORD,
    pub szProtocol: [::WCHAR; WSAPROTOCOL_LEN + 1],
}
impl Clone for WSAPROTOCOL_INFOW { fn clone(&self) -> WSAPROTOCOL_INFOW { *self } }
pub type LPWSAPROTOCOL_INFOW = *mut WSAPROTOCOL_INFOW;

pub type LPCONDITIONPROC = Option<unsafe extern "system" fn(
    lpCallerId: ::LPWSABUF, lpCallerData: ::LPWSABUF, lpSQOS: LPQOS, lpGQOS: LPQOS,
    lpCalleeId: ::LPWSABUF, lpCalleeData: ::LPWSABUF, g: *mut GROUP, dwCallbackData: ::DWORD,
) -> ::c_int>;
pub type LPWSAOVERLAPPED_COMPLETION_ROUTINE = Option<unsafe extern "system" fn(   
    dwError: ::DWORD, cbTransferred: ::DWORD, lpOverlapped: LPWSAOVERLAPPED, dwFlags: ::DWORD,
)>;

#[repr(i32)] #[derive(Clone, Copy, Debug)]
pub enum WSACOMPLETIONTYPE {
    NSP_NOTIFY_IMMEDIATELY = 0,
    NSP_NOTIFY_HWND,
    NSP_NOTIFY_EVENT,
    NSP_NOTIFY_PORT,
    NSP_NOTIFY_APC,
}
pub type PWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE;
pub type LPWSACOMPLETIONTYPE = *mut WSACOMPLETIONTYPE;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSACOMPLETION_WindowMessage {
    pub hWnd: ::HWND,
    pub uMsg: ::UINT,
    pub context: ::WPARAM,
}
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSACOMPLETION_Event {
    pub lpOverlapped: LPWSAOVERLAPPED,
}
#[repr(C)] #[derive(Copy)]
pub struct WSACOMPLETION_Apc {
    pub lpOverlapped: LPWSAOVERLAPPED,
    pub lpfnCompletionProc: LPWSAOVERLAPPED_COMPLETION_ROUTINE
}
impl Clone for WSACOMPLETION_Apc { fn clone(&self) -> WSACOMPLETION_Apc { *self } }
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSACOMPLETION_Port {
    pub lpOverlapped: LPWSAOVERLAPPED,
    pub hPort: ::HANDLE,
    pub Key: ::ULONG_PTR,
}
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSACOMPLETION {
    pub Type: WSACOMPLETIONTYPE,
    #[cfg(target_arch="x86")]
    pub Parameters: [u8; 12],
    #[cfg(target_arch="x86_64")]
    pub Parameters: [u8; 24],
}
UNION!(WSACOMPLETION, Parameters, WindowMessage, WindowMessage_mut, WSACOMPLETION_WindowMessage);
UNION!(WSACOMPLETION, Parameters, Event, Event_mut, WSACOMPLETION_Event);
UNION!(WSACOMPLETION, Parameters, Apc, Apc_mut, WSACOMPLETION_Apc);
UNION!(WSACOMPLETION, Parameters, Port, Port_mut, WSACOMPLETION_Port);
pub type PWSACOMPLETION = *mut WSACOMPLETION;
pub type LPWSACOMPLETION = *mut WSACOMPLETION;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct AFPROTOCOLS {
    pub iAddressFamily: ::INT,
    pub iProtocol: ::INT,
}
pub type PAFPROTOCOLS = *mut AFPROTOCOLS;
pub type LPAFPROTOCOLS = *mut AFPROTOCOLS;

#[repr(i32)] #[derive(Clone, Copy, Debug)]
pub enum WSAECOMPARATOR {
    COMP_EQUAL = 0,
    COMP_NOTLESS,
}
pub type PWSAECOMPARATOR = *mut WSAECOMPARATOR;
pub type LPWSAECOMPARATOR = *mut WSAECOMPARATOR;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAVERSION {
    pub dwVersion: ::DWORD,
    pub ecHow: WSAECOMPARATOR,
}
pub type PWSAVERSION = *mut WSAVERSION;
pub type LPWSAVERSION = *mut WSAVERSION;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAQUERYSETA {
    pub dwSize: ::DWORD,
    pub lpszServiceInstanceName: ::LPSTR,
    pub lpServiceClassId: ::LPGUID,
    pub lpVersion: LPWSAVERSION,
    pub lpszComment: ::LPSTR,
    pub dwNameSpace: ::DWORD,
    pub lpNSProviderId: ::LPGUID,
    pub lpszContext: ::LPSTR,
    pub dwNumberOfProtocols: ::DWORD,
    pub lpafpProtocols: LPAFPROTOCOLS,
    pub lpszQueryString: ::LPSTR,
    pub dwNumberOfCsAddrs: ::DWORD,
    pub lpcsaBuffer: ::LPCSADDR_INFO,
    pub dwOutputFlags: ::DWORD,
    pub lpBlob: ::LPBLOB,
}
pub type PWSAQUERYSETA = *mut WSAQUERYSETA;
pub type LPWSAQUERYSETA = *mut WSAQUERYSETA;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAQUERYSETW {
    pub dwSize: ::DWORD,
    pub lpszServiceInstanceName: ::LPWSTR,
    pub lpServiceClassId: ::LPGUID,
    pub lpVersion: LPWSAVERSION,
    pub lpszComment: ::LPWSTR,
    pub dwNameSpace: ::DWORD,
    pub lpNSProviderId: ::LPGUID,
    pub lpszContext: ::LPWSTR,
    pub dwNumberOfProtocols: ::DWORD,
    pub lpafpProtocols: LPAFPROTOCOLS,
    pub lpszQueryString: ::LPWSTR,
    pub dwNumberOfCsAddrs: ::DWORD,
    pub lpcsaBuffer: ::LPCSADDR_INFO,
    pub dwOutputFlags: ::DWORD,
    pub lpBlob: ::LPBLOB,
}
pub type PWSAQUERYSETW = *mut WSAQUERYSETW;
pub type LPWSAQUERYSETW = *mut WSAQUERYSETW;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAQUERYSET2A {
    pub dwSize: ::DWORD,
    pub lpszServiceInstanceName: ::LPSTR,
    pub lpVersion: LPWSAVERSION,
    pub lpszComment: ::LPSTR,
    pub dwNameSpace: ::DWORD,
    pub lpNSProviderId: ::LPGUID,
    pub lpszContext: ::LPSTR,
    pub dwNumberOfProtocols: ::DWORD,
    pub lpafpProtocols: LPAFPROTOCOLS,
    pub lpszQueryString: ::LPSTR,
    pub dwNumberOfCsAddrs: ::DWORD,
    pub lpcsaBuffer: ::LPCSADDR_INFO,
    pub dwOutputFlags: ::DWORD,
    pub lpBlob: ::LPBLOB,
}
pub type PWSAQUERYSET2A = *mut WSAQUERYSET2A;
pub type LPWSAQUERYSET2A = *mut WSAQUERYSET2A;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAQUERYSET2W {
    pub dwSize: ::DWORD,
    pub lpszServiceInstanceName: ::LPWSTR,
    pub lpVersion: LPWSAVERSION,
    pub lpszComment: ::LPWSTR,
    pub dwNameSpace: ::DWORD,
    pub lpNSProviderId: ::LPGUID,
    pub lpszContext: ::LPWSTR,
    pub dwNumberOfProtocols: ::DWORD,
    pub lpafpProtocols: LPAFPROTOCOLS,
    pub lpszQueryString: ::LPWSTR,
    pub dwNumberOfCsAddrs: ::DWORD,
    pub lpcsaBuffer: ::LPCSADDR_INFO,
    pub dwOutputFlags: ::DWORD,
    pub lpBlob: ::LPBLOB,
}
pub type PWSAQUERYSET2W = *mut WSAQUERYSET2W;
pub type LPWSAQUERYSET2W = *mut WSAQUERYSET2W;

#[repr(i32)] #[derive(Clone, Copy, Debug)]
pub enum WSAESETSERVICEOP {
    RNRSERVICE_REGISTER = 0,
    RNRSERVICE_DEREGISTER,
    RNRSERVICE_DELETE,
}
pub type PWSAESETSERVICEOP = *mut WSAESETSERVICEOP;
pub type LPWSAESETSERVICEOP = *mut WSAESETSERVICEOP;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANSCLASSINFOA {
    pub lpszName: ::LPSTR,
    pub dwNameSpace: ::DWORD,
    pub dwValueType: ::DWORD,
    pub dwValueSize: ::DWORD,
    pub lpValue: ::LPVOID,
}
pub type PWSANSCLASSINFOA = *mut WSANSCLASSINFOA;
pub type LPWSANSCLASSINFOA = *mut WSANSCLASSINFOA;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANSCLASSINFOW {
    pub lpszName: ::LPWSTR,
    pub dwNameSpace: ::DWORD,
    pub dwValueType: ::DWORD,
    pub dwValueSize: ::DWORD,
    pub lpValue: ::LPVOID,
}
pub type PWSANSCLASSINFOW = *mut WSANSCLASSINFOW;
pub type LPWSANSCLASSINFOW = *mut WSANSCLASSINFOW;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSASERVICECLASSINFOA {
    pub lpServiceClassId: ::LPGUID,
    pub lpszServiceClassName: ::LPSTR,
    pub dwCount: ::DWORD,
    pub lpClassInfos: LPWSANSCLASSINFOA,
}
pub type PWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA;
pub type LPWSASERVICECLASSINFOA = *mut WSASERVICECLASSINFOA;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSASERVICECLASSINFOW {
    pub lpServiceClassId: ::LPGUID,
    pub lpszServiceClassName: ::LPWSTR,
    pub dwCount: ::DWORD,
    pub lpClassInfos: LPWSANSCLASSINFOW,
}
pub type PWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW;
pub type LPWSASERVICECLASSINFOW = *mut WSASERVICECLASSINFOW;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANAMESPACE_INFOA {
    pub NSProviderId: ::GUID,
    pub dwNameSpace: ::DWORD,
    pub fActive: ::BOOL,
    pub dwVersion: ::DWORD,
    pub lpszIdentifier: ::LPSTR,
}
pub type PWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA;
pub type LPWSANAMESPACE_INFOA = *mut WSANAMESPACE_INFOA;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANAMESPACE_INFOW {
    pub NSProviderId: ::GUID,
    pub dwNameSpace: ::DWORD,
    pub fActive: ::BOOL,
    pub dwVersion: ::DWORD,
    pub lpszIdentifier: ::LPWSTR,
}
pub type PWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW;
pub type LPWSANAMESPACE_INFOW = *mut WSANAMESPACE_INFOW;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANAMESPACE_INFOEXA {
    pub NSProviderId: ::GUID,
    pub dwNameSpace: ::DWORD,
    pub fActive: ::BOOL,
    pub dwVersion: ::DWORD,
    pub lpszIdentifier: ::LPSTR,
    pub ProviderSpecific: ::BLOB,
}
pub type PWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA;
pub type LPWSANAMESPACE_INFOEXA = *mut WSANAMESPACE_INFOEXA;
#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSANAMESPACE_INFOEXW {
    pub NSProviderId: ::GUID,
    pub dwNameSpace: ::DWORD,
    pub fActive: ::BOOL,
    pub dwVersion: ::DWORD,
    pub lpszIdentifier: ::LPWSTR,
    pub ProviderSpecific: ::BLOB,
}
pub type PWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW;
pub type LPWSANAMESPACE_INFOEXW = *mut WSANAMESPACE_INFOEXW;

pub const POLLRDNORM: ::SHORT = 0x0100;
pub const POLLRDBAND: ::SHORT = 0x0200;
pub const POLLIN: ::SHORT = POLLRDNORM | POLLRDBAND;
pub const POLLPRI: ::SHORT = 0x0400;
pub const POLLWRNORM: ::SHORT = 0x0010;
pub const POLLOUT: ::SHORT = POLLWRNORM;
pub const POLLWRBAND: ::SHORT = 0x0020;
pub const POLLERR: ::SHORT = 0x0001;
pub const POLLHUP: ::SHORT = 0x0002;
pub const POLLNVAL: ::SHORT = 0x0004;

#[repr(C)] #[derive(Clone, Copy, Debug)]
pub struct WSAPOLLFD {
    pub fd: ::SOCKET,
    pub events: ::SHORT,
    pub revents: ::SHORT,
}
pub type PWSAPOLLFD = *mut WSAPOLLFD;
pub type LPWSAPOLLFD = *mut WSAPOLLFD;