d3dx9: Precompute and store a constant direct copy flag.
[wine.git] / include / winsock2.h
bloba2563f4df2e9ca6a93920633dc466d1dc71d8b0c
1 /*
2 * Winsock 2 definitions - used for ws2_32.dll
4 * Copyright (C) 1999 Ove Kaaven
5 * Copyright (C) 2001 Francois Gouget
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 * FIXME: Still missing required Winsock 2 definitions.
24 #ifndef _WINSOCK2API_
25 #define _WINSOCK2API_
28 * Setup phase
31 /* Everything common between winsock.h and winsock2.h */
32 #ifndef INCL_WINSOCK_API_PROTOTYPES
33 #define INCL_WINSOCK_API_PROTOTYPES 1
34 #define WS_API_PROTOTYPES 1
35 #else
36 #define WS_API_PROTOTYPES INCL_WINSOCK_API_PROTOTYPES
37 #endif
39 #ifndef INCL_WINSOCK_API_TYPEDEFS
40 #define INCL_WINSOCK_API_TYPEDEFS 0
41 #define WS_API_TYPEDEFS 0
42 #else
43 #define WS_API_TYPEDEFS INCL_WINSOCK_API_TYPEDEFS
44 #endif
46 #define __WINE_WINSOCK2__
47 #include <winsock.h>
48 #undef __WINE_WINSOCK2__
50 #include <ws2def.h>
52 #ifdef __cplusplus
53 extern "C" {
54 #endif /* defined(__cplusplus) */
57 #ifndef USE_WS_PREFIX
58 #define SO_GROUP_ID 0x2001
59 #define SO_GROUP_PRIORITY 0x2002
60 #define SO_MAX_MSG_SIZE 0x2003
61 #define SO_PROTOCOL_INFOA 0x2004
62 #define SO_PROTOCOL_INFOW 0x2005
63 #define SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
64 #define PVD_CONFIG 0x3001
65 #define SO_CONDITIONAL_ACCEPT 0x3002
66 #else
67 #define WS_SO_GROUP_ID 0x2001
68 #define WS_SO_GROUP_PRIORITY 0x2002
69 #define WS_SO_MAX_MSG_SIZE 0x2003
70 #define WS_SO_PROTOCOL_INFOA 0x2004
71 #define WS_SO_PROTOCOL_INFOW 0x2005
72 #define WS_SO_PROTOCOL_INFO WINELIB_NAME_AW(WS_SO_PROTOCOL_INFO)
73 #define WS_PVD_CONFIG 0x3001
74 #define WS_SO_CONDITIONAL_ACCEPT 0x3002
75 #endif
77 /* protocol types */
79 #define FROM_PROTOCOL_INFO (-1)
81 #ifndef USE_WS_PREFIX
82 #define SOCK_STREAM 1
83 #define SOCK_DGRAM 2
84 #define SOCK_RAW 3
85 #define SOCK_RDM 4
86 #define SOCK_SEQPACKET 5
87 #else /* USE_WS_PREFIX */
88 #define WS_SOCK_STREAM 1
89 #define WS_SOCK_DGRAM 2
90 #define WS_SOCK_RAW 3
91 #define WS_SOCK_RDM 4
92 #define WS_SOCK_SEQPACKET 5
93 #endif /* USE_WS_PREFIX */
95 /* option flags per socket */
97 #define FD_MAX_EVENTS 10
98 #define FD_READ_BIT 0
99 #define FD_WRITE_BIT 1
100 #define FD_OOB_BIT 2
101 #define FD_ACCEPT_BIT 3
102 #define FD_CONNECT_BIT 4
103 #define FD_CLOSE_BIT 5
104 #define FD_QOS_BIT 6
105 #define FD_GROUP_QOS_BIT 7
106 #define FD_ROUTING_INTERFACE_CHANGE_BIT 8
107 #define FD_ADDRESS_LIST_CHANGE_BIT 9
109 #define FD_QOS 0x00000040
110 #define FD_GROUP_QOS 0x00000080
111 #define FD_ROUTING_INTERFACE_CHANGE 0x00000100
112 #define FD_ADDRESS_LIST_CHANGE 0x00000200
114 /* Constants for LPCONDITIONPROC */
115 #define CF_ACCEPT 0x0000
116 #define CF_REJECT 0x0001
117 #define CF_DEFER 0x0002
119 /* Constants for shutdown() */
120 #define SD_RECEIVE 0x00
121 #define SD_SEND 0x01
122 #define SD_BOTH 0x02
124 /* Constants for WSAPoll() */
125 #ifndef USE_WS_PREFIX
126 #ifndef __WINE_WINE_PORT_H
127 #define POLLERR 0x0001
128 #define POLLHUP 0x0002
129 #define POLLNVAL 0x0004
130 #define POLLWRNORM 0x0010
131 #define POLLWRBAND 0x0020
132 #define POLLRDNORM 0x0100
133 #define POLLRDBAND 0x0200
134 #define POLLPRI 0x0400
135 #define POLLIN (POLLRDNORM|POLLRDBAND)
136 #define POLLOUT (POLLWRNORM)
137 #endif
138 #else
139 #define WS_POLLERR 0x0001
140 #define WS_POLLHUP 0x0002
141 #define WS_POLLNVAL 0x0004
142 #define WS_POLLWRNORM 0x0010
143 #define WS_POLLWRBAND 0x0020
144 #define WS_POLLRDNORM 0x0100
145 #define WS_POLLRDBAND 0x0200
146 #define WS_POLLPRI 0x0400
147 #define WS_POLLIN (WS_POLLRDNORM|WS_POLLRDBAND)
148 #define WS_POLLOUT (WS_POLLWRNORM)
149 #endif
151 /* Constants for WSAIoctl() */
152 #ifdef USE_WS_PREFIX
153 #define WS_IOC_UNIX 0x00000000
154 #define WS_IOC_WS2 0x08000000
155 #define WS_IOC_PROTOCOL 0x10000000
156 #define WS_IOC_VENDOR 0x18000000
157 #define WS_IOC_VOID 0x20000000
158 #define WS_IOC_OUT 0x40000000
159 #define WS_IOC_IN 0x80000000
160 #define WS_IOC_INOUT (WS_IOC_IN|WS_IOC_OUT)
161 #define _WSAIO(x,y) (WS_IOC_VOID|(x)|(y))
162 #define _WSAIOR(x,y) (WS_IOC_OUT|(x)|(y))
163 #define _WSAIOW(x,y) (WS_IOC_IN|(x)|(y))
164 #define _WSAIORW(x,y) (WS_IOC_INOUT|(x)|(y))
165 #define WS_SIO_ASSOCIATE_HANDLE _WSAIOW(WS_IOC_WS2,1)
166 #define WS_SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(WS_IOC_WS2,2)
167 #define WS_SIO_FIND_ROUTE _WSAIOR(WS_IOC_WS2,3)
168 #define WS_SIO_FLUSH _WSAIO(WS_IOC_WS2,4)
169 #define WS_SIO_GET_BROADCAST_ADDRESS _WSAIOR(WS_IOC_WS2,5)
170 #define WS_SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(WS_IOC_WS2,6)
171 #define WS_SIO_GET_QOS _WSAIORW(WS_IOC_WS2,7)
172 #define WS_SIO_GET_GROUP_QOS _WSAIORW(WS_IOC_WS2,8)
173 #define WS_SIO_MULTIPOINT_LOOPBACK _WSAIOW(WS_IOC_WS2,9)
174 #define WS_SIO_MULTICAST_SCOPE _WSAIOW(WS_IOC_WS2,10)
175 #define WS_SIO_SET_QOS _WSAIOW(WS_IOC_WS2,11)
176 #define WS_SIO_SET_GROUP_QOS _WSAIOW(WS_IOC_WS2,12)
177 #define WS_SIO_TRANSLATE_HANDLE _WSAIORW(WS_IOC_WS2,13)
178 #define WS_SIO_ROUTING_INTERFACE_QUERY _WSAIORW(WS_IOC_WS2,20)
179 #define WS_SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(WS_IOC_WS2,21)
180 #define WS_SIO_ADDRESS_LIST_QUERY _WSAIOR(WS_IOC_WS2,22)
181 #define WS_SIO_ADDRESS_LIST_CHANGE _WSAIO(WS_IOC_WS2,23)
182 #define WS_SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(WS_IOC_WS2,24)
183 #define WS_SIO_GET_INTERFACE_LIST WS__IOR('t', 127, ULONG)
184 #else /* USE_WS_PREFIX */
185 #undef IOC_VOID
186 #undef IOC_IN
187 #undef IOC_OUT
188 #undef IOC_INOUT
189 #define IOC_UNIX 0x00000000
190 #define IOC_WS2 0x08000000
191 #define IOC_PROTOCOL 0x10000000
192 #define IOC_VENDOR 0x18000000
193 #define IOC_VOID 0x20000000
194 #define IOC_OUT 0x40000000
195 #define IOC_IN 0x80000000
196 #define IOC_INOUT (IOC_IN|IOC_OUT)
197 #define _WSAIO(x,y) (IOC_VOID|(x)|(y))
198 #define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
199 #define _WSAIOW(x,y) (IOC_IN|(x)|(y))
200 #define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
201 #define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
202 #define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
203 #define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
204 #define SIO_FLUSH _WSAIO(IOC_WS2,4)
205 #define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
206 #define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
207 #define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
208 #define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
209 #define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
210 #define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
211 #define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
212 #define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
213 #define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
214 #define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
215 #define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
216 #define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
217 #define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
218 #define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
219 #define SIO_GET_INTERFACE_LIST _IOR ('t', 127, ULONG)
220 #endif /* USE_WS_PREFIX */
222 /* Constants for WSAIoctl() */
223 #define WSA_FLAG_OVERLAPPED 0x0001
224 #define WSA_FLAG_MULTIPOINT_C_ROOT 0x0002
225 #define WSA_FLAG_MULTIPOINT_C_LEAF 0x0004
226 #define WSA_FLAG_MULTIPOINT_D_ROOT 0x0008
227 #define WSA_FLAG_MULTIPOINT_D_LEAF 0x0010
228 #define WSA_FLAG_ACCESS_SYSTEM_SECURITY 0x0040
229 #define WSA_FLAG_NO_HANDLE_INHERIT 0x0080
230 #define WSA_FLAG_REGISTERED_IO 0x0100
232 /* Constants for WSAJoinLeaf() */
233 #define JL_SENDER_ONLY 0x01
234 #define JL_RECEIVER_ONLY 0x02
235 #define JL_BOTH 0x04
237 /* Constants for WSALookupServiceBegin() */
238 #define LUP_DEEP 0x0001
239 #define LUP_RETURN_NAME 0x0010
240 #define LUP_RETURN_TYPE 0x0020
241 #define LUP_RETURN_VERSION 0x0040
242 #define LUP_RETURN_COMMENT 0x0080
243 #define LUP_RETURN_ADDR 0x0100
244 #define LUP_RETURN_BLOB 0x0200
245 #define LUP_RETURN_ALIASES 0x0400
246 #define LUP_RETURN_QUERY_STRING 0x0800
247 #define LUP_RETURN_ALL (LUP_RETURN_ADDR|LUP_RETURN_BLOB|LUP_RETURN_ALIASES|LUP_RETURN_QUERY_STRING \
248 |LUP_RETURN_NAME|LUP_RETURN_TYPE|LUP_RETURN_VERSION|LUP_RETURN_COMMENT)
250 /* Constants for dwNameSpace from struct WSANAMESPACE_INFO */
251 #define NS_ALL 0
252 #define NS_SAP 1
253 #define NS_NDS 2
254 #define NS_PEER_BROWSE 3
255 #define NS_SLP 5
256 #define NS_DHCP 6
257 #define NS_TCPIP_LOCAL 10
258 #define NS_TCPIP_HOSTS 11
259 #define NS_DNS 12
260 #define NS_NETBT 13
261 #define NS_WINS 14
262 #define NS_NLA 15
263 #define NS_BTH 16
264 #define NS_NBP 20
265 #define NS_MS 30
266 #define NS_STDA 31
267 #define NS_NTDS 32
268 #define NS_EMAIL 37
269 #define NS_PNRPNAME 38
270 #define NS_PNRPCLOUD 39
271 #define NS_X500 40
272 #define NS_NIS 41
273 #define NS_NISPLUS 42
274 #define NS_WRQ 50
275 #define NS_NETDES 60
277 #ifndef GUID_DEFINED
278 #include <guiddef.h>
279 #endif
281 #define MAX_PROTOCOL_CHAIN 7
282 #define BASE_PROTOCOL 1
283 #define LAYERED_PROTOCOL 0
285 typedef struct _WSAPROTOCOLCHAIN
287 int ChainLen; /* the length of the chain, */
288 /* length = 0 means layered protocol, */
289 /* length = 1 means base protocol, */
290 /* length > 1 means protocol chain */
291 DWORD ChainEntries[MAX_PROTOCOL_CHAIN]; /* a list of dwCatalogEntryIds */
292 } WSAPROTOCOLCHAIN, * LPWSAPROTOCOLCHAIN;
294 /* constants used in dwProviderFlags from struct WSAPROTOCOL_INFO */
295 #define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
296 #define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
297 #define PFL_HIDDEN 0x00000004
298 #define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
300 #define XP1_CONNECTIONLESS 0x00000001
301 #define XP1_GUARANTEED_DELIVERY 0x00000002
302 #define XP1_GUARANTEED_ORDER 0x00000004
303 #define XP1_MESSAGE_ORIENTED 0x00000008
304 #define XP1_PSEUDO_STREAM 0x00000010
305 #define XP1_GRACEFUL_CLOSE 0x00000020
306 #define XP1_EXPEDITED_DATA 0x00000040
307 #define XP1_CONNECT_DATA 0x00000080
308 #define XP1_DISCONNECT_DATA 0x00000100
309 #define XP1_SUPPORT_BROADCAST 0x00000200
310 #define XP1_SUPPORT_MULTIPOINT 0x00000400
311 #define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
312 #define XP1_MULTIPOINT_DATA_PLANE 0x00001000
313 #define XP1_QOS_SUPPORTED 0x00002000
314 #define XP1_INTERRUPT 0x00004000
315 #define XP1_UNI_SEND 0x00008000
316 #define XP1_UNI_RECV 0x00010000
317 #define XP1_IFS_HANDLES 0x00020000
318 #define XP1_PARTIAL_MESSAGE 0x00040000
320 #define BIGENDIAN 0x0000
321 #define LITTLEENDIAN 0x0001
323 #define SECURITY_PROTOCOL_NONE 0x0000
325 typedef struct /*WS(pollfd)*/
327 SOCKET fd;
328 SHORT events;
329 SHORT revents;
330 } WSAPOLLFD;
332 #define WSAPROTOCOL_LEN 255
333 typedef struct _WSAPROTOCOL_INFOA
335 DWORD dwServiceFlags1;
336 DWORD dwServiceFlags2;
337 DWORD dwServiceFlags3;
338 DWORD dwServiceFlags4;
339 DWORD dwProviderFlags;
340 GUID ProviderId;
341 DWORD dwCatalogEntryId;
342 WSAPROTOCOLCHAIN ProtocolChain;
343 int iVersion;
344 int iAddressFamily;
345 int iMaxSockAddr;
346 int iMinSockAddr;
347 int iSocketType;
348 int iProtocol;
349 int iProtocolMaxOffset;
350 int iNetworkByteOrder;
351 int iSecurityScheme;
352 DWORD dwMessageSize;
353 DWORD dwProviderReserved;
354 CHAR szProtocol[WSAPROTOCOL_LEN+1];
355 } WSAPROTOCOL_INFOA, * LPWSAPROTOCOL_INFOA;
357 typedef struct _WSAPROTOCOL_INFOW
359 DWORD dwServiceFlags1;
360 DWORD dwServiceFlags2;
361 DWORD dwServiceFlags3;
362 DWORD dwServiceFlags4;
363 DWORD dwProviderFlags;
364 GUID ProviderId;
365 DWORD dwCatalogEntryId;
366 WSAPROTOCOLCHAIN ProtocolChain;
367 int iVersion;
368 int iAddressFamily;
369 int iMaxSockAddr;
370 int iMinSockAddr;
371 int iSocketType;
372 int iProtocol;
373 int iProtocolMaxOffset;
374 int iNetworkByteOrder;
375 int iSecurityScheme;
376 DWORD dwMessageSize;
377 DWORD dwProviderReserved;
378 WCHAR szProtocol[WSAPROTOCOL_LEN+1];
379 } WSAPROTOCOL_INFOW, *LPWSAPROTOCOL_INFOW;
381 DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO)
382 DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
384 typedef struct _WSANETWORKEVENTS
386 LONG lNetworkEvents;
387 int iErrorCode[FD_MAX_EVENTS];
388 } WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
390 typedef struct _WSANSClassInfoA
392 LPSTR lpszName;
393 DWORD dwNameSpace;
394 DWORD dwValueType;
395 DWORD dwValueSize;
396 LPVOID lpValue;
397 } WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
399 typedef struct _WSANSClassInfoW
401 LPSTR lpszName;
402 DWORD dwNameSpace;
403 DWORD dwValueType;
404 DWORD dwValueSize;
405 LPVOID lpValue;
406 } WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
408 DECL_WINELIB_TYPE_AW(WSANSCLASSINFO)
409 DECL_WINELIB_TYPE_AW(PWSANSCLASSINFO)
410 DECL_WINELIB_TYPE_AW(LPWSANSCLASSINFO)
412 typedef struct _WSAServiceClassInfoA
414 LPGUID lpServiceClassId;
415 LPSTR lpszServiceClassName;
416 DWORD dwCount;
417 LPWSANSCLASSINFOA lpClassInfos;
418 } WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
420 typedef struct _WSAServiceClassInfoW
422 LPGUID lpServiceClassId;
423 LPWSTR lpszServiceClassName;
424 DWORD dwCount;
425 LPWSANSCLASSINFOW lpClassInfos;
426 } WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
429 DECL_WINELIB_TYPE_AW(WSASERVICECLASSINFO)
430 DECL_WINELIB_TYPE_AW(PWSASERVICECLASSINFO)
431 DECL_WINELIB_TYPE_AW(LPWSASERVICECLASSINFO)
433 #define WSAEVENT HANDLE
434 #define LPWSAEVENT LPHANDLE
435 #define WSAOVERLAPPED OVERLAPPED
436 typedef struct _OVERLAPPED* LPWSAOVERLAPPED;
438 #define WSA_IO_PENDING (ERROR_IO_PENDING)
439 #define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
440 #define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
441 #define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
442 #define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
443 #define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
445 #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
446 #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
447 #define WSA_WAIT_FAILED ((DWORD)-1)
448 #define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
449 #define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
450 #define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
451 #define WSA_INFINITE (INFINITE)
453 typedef unsigned int GROUP;
454 #define SG_UNCONSTRAINED_GROUP 0x01
455 #define SG_CONSTRAINED_GROUP 0x02
458 * FLOWSPEC and SERVICETYPE should eventually move to qos.h
461 typedef ULONG SERVICETYPE;
463 typedef struct _FLOWSPEC {
464 unsigned int TokenRate;
465 unsigned int TokenBucketSize;
466 unsigned int PeakBandwidth;
467 unsigned int Latency;
468 unsigned int DelayVariation;
469 SERVICETYPE ServiceType;
470 unsigned int MaxSduSize;
471 unsigned int MinimumPolicedSize;
472 } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC;
474 typedef struct _QUALITYOFSERVICE {
475 FLOWSPEC SendingFlowspec;
476 FLOWSPEC ReceivingFlowspec;
477 WSABUF ProviderSpecific;
478 } QOS, *LPQOS;
480 typedef int (CALLBACK *LPCONDITIONPROC)
482 LPWSABUF lpCallerId,
483 LPWSABUF lpCallerData,
484 LPQOS lpSQOS,
485 LPQOS lpGQOS,
486 LPWSABUF lpCalleeId,
487 LPWSABUF lpCalleeData,
488 GROUP *g,
489 DWORD_PTR dwCallbackData
492 typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
494 DWORD dwError,
495 DWORD cbTransferred,
496 LPWSAOVERLAPPED lpOverlapped,
497 DWORD dwFlags
500 #ifndef _tagBLOB_DEFINED
501 #define _tagBLOB_DEFINED
502 #define _BLOB_DEFINED
503 #define _LPBLOB_DEFINED
504 typedef struct _BLOB {
505 ULONG cbSize;
506 BYTE *pBlobData;
507 } BLOB, *LPBLOB;
508 #endif
510 /* addressfamily protocol pairs */
511 typedef struct _AFPROTOCOLS {
512 INT iAddressFamily;
513 INT iProtocol;
514 } AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS;
516 /* client query definitions */
517 typedef enum _WSAEcomparator {
518 COMP_EQUAL = 0,
519 COMP_NOTLESS
520 } WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR;
522 typedef struct _WSAVersion {
523 DWORD dwVersion;
524 WSAECOMPARATOR ecHow;
525 } WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
528 typedef struct _WSAQuerySetA {
529 DWORD dwSize;
530 LPSTR lpszServiceInstanceName;
531 LPGUID lpServiceClassId;
532 LPWSAVERSION lpVersion;
533 LPSTR lpszComment;
534 DWORD dwNameSpace;
535 LPGUID lpNSProviderId;
536 LPSTR lpszContext;
537 DWORD dwNumberOfProtocols;
538 LPAFPROTOCOLS lpafpProtocols;
539 LPSTR lpszQueryString;
540 DWORD dwNumberOfCsAddrs;
541 LPCSADDR_INFO lpcsaBuffer;
542 DWORD dwOutputFlags;
543 LPBLOB lpBlob;
544 } WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA;
546 typedef struct _WSAQuerySetW {
547 DWORD dwSize;
548 LPWSTR lpszServiceInstanceName;
549 LPGUID lpServiceClassId;
550 LPWSAVERSION lpVersion;
551 LPWSTR lpszComment;
552 DWORD dwNameSpace;
553 LPGUID lpNSProviderId;
554 LPWSTR lpszContext;
555 DWORD dwNumberOfProtocols;
556 LPAFPROTOCOLS lpafpProtocols;
557 LPWSTR lpszQueryString;
558 DWORD dwNumberOfCsAddrs;
559 LPCSADDR_INFO lpcsaBuffer;
560 DWORD dwOutputFlags;
561 LPBLOB lpBlob;
562 } WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW;
564 DECL_WINELIB_TYPE_AW(WSAQUERYSET)
565 DECL_WINELIB_TYPE_AW(PWSAQUERYSET)
566 DECL_WINELIB_TYPE_AW(LPWSAQUERYSET)
568 typedef enum _WSAESETSERVICEOP {
569 RNRSERVICE_REGISTER = 0,
570 RNRSERVICE_DEREGISTER,
571 RNRSERVICE_DELETE
572 } WSAESETSERVICEOP, *PWSAESETSERVICEOP, *LPWSAESETSERVICEOP;
574 typedef struct _WSANAMESPACE_INFOA {
575 GUID NSProviderId;
576 DWORD dwNameSpace;
577 BOOL fActive;
578 DWORD dwVersion;
579 LPSTR lpszIdentifier;
580 } WSANAMESPACE_INFOA, *PWSANAMESPACE_INFOA, *LPWSANAMESPACE_INFOA;
582 typedef struct _WSANAMESPACE_INFOW {
583 GUID NSProviderId;
584 DWORD dwNameSpace;
585 BOOL fActive;
586 DWORD dwVersion;
587 LPWSTR lpszIdentifier;
588 } WSANAMESPACE_INFOW, *PWSANAMESPACE_INFOW, *LPWSANAMESPACE_INFOW;
590 DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO)
591 DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO)
592 DECL_WINELIB_TYPE_AW(LPWSANAMESPACE_INFO)
594 typedef enum _WSACOMPLETIONTYPE {
595 NSP_NOTIFY_IMMEDIATELY = 0,
596 NSP_NOTIFY_HWND = 1,
597 NSP_NOTIFY_EVENT = 2,
598 NSP_NOTIFY_PORT = 3,
599 NSP_NOTIFY_APC = 4
600 } WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE;
602 typedef struct _WSACOMPLETION {
603 WSACOMPLETIONTYPE Type;
604 union {
605 struct {
606 HWND hWnd;
607 UINT uMsg;
608 WPARAM context;
609 } WindowMessage;
610 struct {
611 LPWSAOVERLAPPED lpOverlapped;
612 } Event;
613 struct {
614 LPWSAOVERLAPPED lpOverlapped;
615 LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
616 } Apc;
617 struct {
618 LPWSAOVERLAPPED lpOverlapped;
619 HANDLE hPort;
620 ULONG_PTR Key;
621 } Port;
622 } Parameters;
623 } WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
626 * Winsock Function Typedefs
628 * Remember to keep this section in sync with the
629 * "Prototypes" section in winsock.h.
631 #if WS_API_TYPEDEFS
632 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,WS(u_int),const char*,int,int,char*,int);
633 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,WS(u_int),const char*,char*,int);
634 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,char*,int);
635 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
636 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
637 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
638 typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
639 typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
640 typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
641 typedef int (WINAPI *LPFN_WSACLEANUP)(void);
642 typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
643 typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
644 typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
645 typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
646 typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
647 typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
649 typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
650 typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
651 typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
652 typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
653 typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
654 typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
655 typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
656 typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
657 typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
658 typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
659 #ifdef WS_DEFINE_SELECT
660 typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
661 #endif
662 typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
663 typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
664 typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
665 typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
666 typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
667 typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
668 typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
669 typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr));
670 typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
671 typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
672 typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
673 typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
674 typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
675 typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
676 typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
677 typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
678 typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
679 typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
680 typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
681 #endif /* WS_API_TYPEDEFS */
686 * Winsock2 Prototypes
688 * Remember to keep this section in sync with the
689 * "Winsock2 Function Typedefs" section below.
691 #if WS_API_PROTOTYPES
692 SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
693 INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
694 INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
695 #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
696 BOOL WINAPI WSACloseEvent(WSAEVENT);
697 int WINAPI WSAConnect(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
698 WSAEVENT WINAPI WSACreateEvent(void);
699 INT WINAPI WSADuplicateSocketA(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
700 INT WINAPI WSADuplicateSocketW(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
701 #define WSADuplicateSocket WINELIB_NAME_AW(WSADuplicateSocket)
702 INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD,LPWSANAMESPACE_INFOA);
703 INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD,LPWSANAMESPACE_INFOW);
704 #define WSAEnumNameSpaceProviders WINELIB_NAME_AW(WSAEnumNameSpaceProviders)
705 int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
706 int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
707 int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
708 #define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
709 int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
710 BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
711 BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
712 INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
713 INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
714 #define WSAGetServiceClassInfo WINELIB_NAME_AW(WSAGetServiceClassInfo)
715 INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
716 INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
717 #define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
718 int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
719 int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
720 int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
721 int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
722 #define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass)
723 int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
724 SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
725 INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA,DWORD,LPHANDLE);
726 INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW,DWORD,LPHANDLE);
727 #define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin)
728 INT WINAPI WSALookupServiceEnd(HANDLE);
729 INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
730 INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
731 #define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
732 int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
733 int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
734 int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
735 int WINAPI WSAPoll(WSAPOLLFD*,ULONG,int);
736 INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
737 int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
738 int WINAPI WSARecvDisconnect(SOCKET,LPWSABUF);
739 int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
740 INT WINAPI WSARemoveServiceClass(LPGUID);
741 BOOL WINAPI WSAResetEvent(WSAEVENT);
742 int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
743 int WINAPI WSASendDisconnect(SOCKET,LPWSABUF);
744 int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
745 BOOL WINAPI WSASetEvent(WSAEVENT);
746 INT WINAPI WSASetServiceA(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
747 INT WINAPI WSASetServiceW(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
748 #define WSASetService WINELIB_NAME_AW(WSASetService)
749 SOCKET WINAPI WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
750 SOCKET WINAPI WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
751 #define WSASocket WINELIB_NAME_AW(WSASocket)
752 INT WINAPI WSAStringToAddressA(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
753 INT WINAPI WSAStringToAddressW(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT);
754 #define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
755 DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
756 #endif /* WS_API_PROTOTYPES */
761 * Winsock2 Function Typedefs
763 * Remember to keep this section in sync with the
764 * "Winsock2 Prototypes" section above.
766 #if WS_API_TYPEDEFS
767 typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
768 typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
769 typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
770 #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
771 typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
772 typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
773 typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
774 typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
775 typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
776 #define LPFN_WSADUPLICATESOCKET WINELIB_NAME_AW(LPFN_WSADUPLICATESOCKET)
777 typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(LPDWORD,LPWSANAMESPACE_INFOA);
778 typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)(LPDWORD,LPWSANAMESPACE_INFOW);
779 #define LPFN_WSAENUMNAMESPACEPROVIDERS WINELIB_NAME_AW(LPFN_WSAENUMNAMESPACEPROVIDERS)
780 typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENTS)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
781 typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
782 typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
783 #define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
784 typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
785 typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
786 typedef BOOL (WINAPI *LPFN_WSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
787 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
788 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
789 #define LPFN_LPFNWSAGETSERVICECLASSINFO WINELIB_NAME_AW(LPFN_LPFNWSAGETSERVICECLASSINFO)
790 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
791 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
792 #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
793 typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
794 typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
795 typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
796 typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
797 typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
798 typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
799 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA,DWORD,LPHANDLE);
800 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW,DWORD,LPHANDLE);
801 #define LPFN_WSALOOKUPSERVICEBEGIN WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICEBEGIN)
802 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND)(HANDLE);
803 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
804 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
805 #define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
806 typedef int (WINAPI *LPFN_WSANSPIOCTL)(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
807 typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
808 typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
809 typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
810 typedef int (WINAPI *LPFN_WSAPOLL)(WSAPOLLFD*,ULONG,int);
811 typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
812 typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET,LPWSABUF);
813 typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
814 typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
815 typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
816 typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
817 typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET,LPWSABUF);
818 typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
819 typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
820 typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
821 typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
822 #define LPFN_WSASETSERVICE WINELIB_NAME_AW(LPFN_WSASETSERVICE)
823 typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
824 typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
825 typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
826 typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSW)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
827 #define LPFN_WSASOCKET WINELIB_NAME_AW(LPFN_WSASOCKET)
828 #define LPFN_WSASTRINGTOADDRESS WINELIB_NAME_AW(LPFN_WSASTRINGTOADDRESS)
829 typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
830 #endif /* WS_API_TYPEDEFS */
833 /* Condition function return values */
834 #define CF_ACCEPT 0x0000
835 #define CF_REJECT 0x0001
836 #define CF_DEFER 0x0002
838 #ifdef __cplusplus
840 #endif
842 #undef WS
843 #undef WS_API_PROTOTYPES
844 #undef WS_API_TYPEDEFS
846 #endif /* __WINSOCK2API__ */