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