oleaut32: Implement proxy/stub for IEnumConnections::Next().
[wine.git] / include / winsock2.h
blobfa3d26b036b10a23c5e18be9a33a403107d934ba
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
105 /* Constants for LPCONDITIONPROC */
106 #define CF_ACCEPT 0x0000
107 #define CF_REJECT 0x0001
108 #define CF_DEFER 0x0002
110 /* Constants for shutdown() */
111 #define SD_RECEIVE 0x00
112 #define SD_SEND 0x01
113 #define SD_BOTH 0x02
115 /* Constants for WSAIoctl() */
116 #ifdef USE_WS_PREFIX
117 #define WS_IOC_UNIX 0x00000000
118 #define WS_IOC_WS2 0x08000000
119 #define WS_IOC_PROTOCOL 0x10000000
120 #define WS_IOC_VENDOR 0x18000000
121 #define WS_IOC_VOID 0x20000000
122 #define WS_IOC_OUT 0x40000000
123 #define WS_IOC_IN 0x80000000
124 #define WS_IOC_INOUT (WS_IOC_IN|WS_IOC_OUT)
125 #define _WSAIO(x,y) (WS_IOC_VOID|(x)|(y))
126 #define _WSAIOR(x,y) (WS_IOC_OUT|(x)|(y))
127 #define _WSAIOW(x,y) (WS_IOC_IN|(x)|(y))
128 #define _WSAIORW(x,y) (WS_IOC_INOUT|(x)|(y))
129 #define WS_SIO_ASSOCIATE_HANDLE _WSAIOW(WS_IOC_WS2,1)
130 #define WS_SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(WS_IOC_WS2,2)
131 #define WS_SIO_FIND_ROUTE _WSAIOR(WS_IOC_WS2,3)
132 #define WS_SIO_FLUSH _WSAIO(WS_IOC_WS2,4)
133 #define WS_SIO_GET_BROADCAST_ADDRESS _WSAIOR(WS_IOC_WS2,5)
134 #define WS_SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(WS_IOC_WS2,6)
135 #define WS_SIO_GET_QOS _WSAIORW(WS_IOC_WS2,7)
136 #define WS_SIO_GET_GROUP_QOS _WSAIORW(WS_IOC_WS2,8)
137 #define WS_SIO_MULTIPOINT_LOOPBACK _WSAIOW(WS_IOC_WS2,9)
138 #define WS_SIO_MULTICAST_SCOPE _WSAIOW(WS_IOC_WS2,10)
139 #define WS_SIO_SET_QOS _WSAIOW(WS_IOC_WS2,11)
140 #define WS_SIO_SET_GROUP_QOS _WSAIOW(WS_IOC_WS2,12)
141 #define WS_SIO_TRANSLATE_HANDLE _WSAIORW(WS_IOC_WS2,13)
142 #define WS_SIO_ROUTING_INTERFACE_QUERY _WSAIORW(WS_IOC_WS2,20)
143 #define WS_SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(WS_IOC_WS2,21)
144 #define WS_SIO_ADDRESS_LIST_QUERY _WSAIOR(WS_IOC_WS2,22)
145 #define WS_SIO_ADDRESS_LIST_CHANGE _WSAIO(WS_IOC_WS2,23)
146 #define WS_SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(WS_IOC_WS2,24)
147 #define WS_SIO_GET_INTERFACE_LIST WS__IOR('t', 127, ULONG)
148 #else /* USE_WS_PREFIX */
149 #undef IOC_VOID
150 #undef IOC_IN
151 #undef IOC_OUT
152 #undef IOC_INOUT
153 #define IOC_UNIX 0x00000000
154 #define IOC_WS2 0x08000000
155 #define IOC_PROTOCOL 0x10000000
156 #define IOC_VENDOR 0x18000000
157 #define IOC_VOID 0x20000000
158 #define IOC_OUT 0x40000000
159 #define IOC_IN 0x80000000
160 #define IOC_INOUT (IOC_IN|IOC_OUT)
161 #define _WSAIO(x,y) (IOC_VOID|(x)|(y))
162 #define _WSAIOR(x,y) (IOC_OUT|(x)|(y))
163 #define _WSAIOW(x,y) (IOC_IN|(x)|(y))
164 #define _WSAIORW(x,y) (IOC_INOUT|(x)|(y))
165 #define SIO_ASSOCIATE_HANDLE _WSAIOW(IOC_WS2,1)
166 #define SIO_ENABLE_CIRCULAR_QUEUEING _WSAIO(IOC_WS2,2)
167 #define SIO_FIND_ROUTE _WSAIOR(IOC_WS2,3)
168 #define SIO_FLUSH _WSAIO(IOC_WS2,4)
169 #define SIO_GET_BROADCAST_ADDRESS _WSAIOR(IOC_WS2,5)
170 #define SIO_GET_EXTENSION_FUNCTION_POINTER _WSAIORW(IOC_WS2,6)
171 #define SIO_GET_QOS _WSAIORW(IOC_WS2,7)
172 #define SIO_GET_GROUP_QOS _WSAIORW(IOC_WS2,8)
173 #define SIO_MULTIPOINT_LOOPBACK _WSAIOW(IOC_WS2,9)
174 #define SIO_MULTICAST_SCOPE _WSAIOW(IOC_WS2,10)
175 #define SIO_SET_QOS _WSAIOW(IOC_WS2,11)
176 #define SIO_SET_GROUP_QOS _WSAIOW(IOC_WS2,12)
177 #define SIO_TRANSLATE_HANDLE _WSAIORW(IOC_WS2,13)
178 #define SIO_ROUTING_INTERFACE_QUERY _WSAIORW(IOC_WS2,20)
179 #define SIO_ROUTING_INTERFACE_CHANGE _WSAIOW(IOC_WS2,21)
180 #define SIO_ADDRESS_LIST_QUERY _WSAIOR(IOC_WS2,22)
181 #define SIO_ADDRESS_LIST_CHANGE _WSAIO(IOC_WS2,23)
182 #define SIO_QUERY_TARGET_PNP_HANDLE _WSAIOR(IOC_WS2,24)
183 #define SIO_GET_INTERFACE_LIST _IOR ('t', 127, ULONG)
184 #endif /* USE_WS_PREFIX */
186 /* Constants for WSAIoctl() */
187 #define WSA_FLAG_OVERLAPPED 0x0001
188 #define WSA_FLAG_MULTIPOINT_C_ROOT 0x0002
189 #define WSA_FLAG_MULTIPOINT_C_LEAF 0x0004
190 #define WSA_FLAG_MULTIPOINT_D_ROOT 0x0008
191 #define WSA_FLAG_MULTIPOINT_D_LEAF 0x0010
192 #define WSA_FLAG_ACCESS_SYSTEM_SECURITY 0x0040
193 #define WSA_FLAG_NO_HANDLE_INHERIT 0x0080
194 #define WSA_FLAG_REGISTERED_IO 0x0100
196 /* Constants for WSAJoinLeaf() */
197 #define JL_SENDER_ONLY 0x01
198 #define JL_RECEIVER_ONLY 0x02
199 #define JL_BOTH 0x04
201 /* Constants for WSALookupServiceBegin() */
202 #define LUP_DEEP 0x0001
203 #define LUP_RETURN_NAME 0x0010
204 #define LUP_RETURN_TYPE 0x0020
205 #define LUP_RETURN_VERSION 0x0040
206 #define LUP_RETURN_COMMENT 0x0080
207 #define LUP_RETURN_ADDR 0x0100
208 #define LUP_RETURN_BLOB 0x0200
209 #define LUP_RETURN_ALIASES 0x0400
210 #define LUP_RETURN_QUERY_STRING 0x0800
211 #define LUP_RETURN_ALL (LUP_RETURN_ADDR|LUP_RETURN_BLOB|LUP_RETURN_ALIASES|LUP_RETURN_QUERY_STRING \
212 |LUP_RETURN_NAME|LUP_RETURN_TYPE|LUP_RETURN_VERSION|LUP_RETURN_COMMENT)
214 #ifndef GUID_DEFINED
215 #include <guiddef.h>
216 #endif
218 #define MAX_PROTOCOL_CHAIN 7
219 #define BASE_PROTOCOL 1
220 #define LAYERED_PROTOCOL 0
222 typedef struct _WSAPROTOCOLCHAIN
224 int ChainLen; /* the length of the chain, */
225 /* length = 0 means layered protocol, */
226 /* length = 1 means base protocol, */
227 /* length > 1 means protocol chain */
228 DWORD ChainEntries[MAX_PROTOCOL_CHAIN]; /* a list of dwCatalogEntryIds */
229 } WSAPROTOCOLCHAIN, * LPWSAPROTOCOLCHAIN;
231 /* constants used in dwProviderFlags from struct WSAPROTOCOL_INFO */
232 #define PFL_MULTIPLE_PROTO_ENTRIES 0x00000001
233 #define PFL_RECOMMENDED_PROTO_ENTRY 0x00000002
234 #define PFL_HIDDEN 0x00000004
235 #define PFL_MATCHES_PROTOCOL_ZERO 0x00000008
237 #define XP1_CONNECTIONLESS 0x00000001
238 #define XP1_GUARANTEED_DELIVERY 0x00000002
239 #define XP1_GUARANTEED_ORDER 0x00000004
240 #define XP1_MESSAGE_ORIENTED 0x00000008
241 #define XP1_PSEUDO_STREAM 0x00000010
242 #define XP1_GRACEFUL_CLOSE 0x00000020
243 #define XP1_EXPEDITED_DATA 0x00000040
244 #define XP1_CONNECT_DATA 0x00000080
245 #define XP1_DISCONNECT_DATA 0x00000100
246 #define XP1_SUPPORT_BROADCAST 0x00000200
247 #define XP1_SUPPORT_MULTIPOINT 0x00000400
248 #define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
249 #define XP1_MULTIPOINT_DATA_PLANE 0x00001000
250 #define XP1_QOS_SUPPORTED 0x00002000
251 #define XP1_INTERRUPT 0x00004000
252 #define XP1_UNI_SEND 0x00008000
253 #define XP1_UNI_RECV 0x00010000
254 #define XP1_IFS_HANDLES 0x00020000
255 #define XP1_PARTIAL_MESSAGE 0x00040000
257 #define BIGENDIAN 0x0000
258 #define LITTLEENDIAN 0x0001
260 #define SECURITY_PROTOCOL_NONE 0x0000
262 #define WSAPROTOCOL_LEN 255
263 typedef struct _WSAPROTOCOL_INFOA
265 DWORD dwServiceFlags1;
266 DWORD dwServiceFlags2;
267 DWORD dwServiceFlags3;
268 DWORD dwServiceFlags4;
269 DWORD dwProviderFlags;
270 GUID ProviderId;
271 DWORD dwCatalogEntryId;
272 WSAPROTOCOLCHAIN ProtocolChain;
273 int iVersion;
274 int iAddressFamily;
275 int iMaxSockAddr;
276 int iMinSockAddr;
277 int iSocketType;
278 int iProtocol;
279 int iProtocolMaxOffset;
280 int iNetworkByteOrder;
281 int iSecurityScheme;
282 DWORD dwMessageSize;
283 DWORD dwProviderReserved;
284 CHAR szProtocol[WSAPROTOCOL_LEN+1];
285 } WSAPROTOCOL_INFOA, * LPWSAPROTOCOL_INFOA;
287 typedef struct _WSAPROTOCOL_INFOW
289 DWORD dwServiceFlags1;
290 DWORD dwServiceFlags2;
291 DWORD dwServiceFlags3;
292 DWORD dwServiceFlags4;
293 DWORD dwProviderFlags;
294 GUID ProviderId;
295 DWORD dwCatalogEntryId;
296 WSAPROTOCOLCHAIN ProtocolChain;
297 int iVersion;
298 int iAddressFamily;
299 int iMaxSockAddr;
300 int iMinSockAddr;
301 int iSocketType;
302 int iProtocol;
303 int iProtocolMaxOffset;
304 int iNetworkByteOrder;
305 int iSecurityScheme;
306 DWORD dwMessageSize;
307 DWORD dwProviderReserved;
308 WCHAR szProtocol[WSAPROTOCOL_LEN+1];
309 } WSAPROTOCOL_INFOW, *LPWSAPROTOCOL_INFOW;
311 DECL_WINELIB_TYPE_AW(WSAPROTOCOL_INFO)
312 DECL_WINELIB_TYPE_AW(LPWSAPROTOCOL_INFO)
314 typedef struct _WSANETWORKEVENTS
316 LONG lNetworkEvents;
317 int iErrorCode[FD_MAX_EVENTS];
318 } WSANETWORKEVENTS, *LPWSANETWORKEVENTS;
320 typedef struct _WSANSClassInfoA
322 LPSTR lpszName;
323 DWORD dwNameSpace;
324 DWORD dwValueType;
325 DWORD dwValueSize;
326 LPVOID lpValue;
327 } WSANSCLASSINFOA, *PWSANSCLASSINFOA, *LPWSANSCLASSINFOA;
329 typedef struct _WSANSClassInfoW
331 LPSTR lpszName;
332 DWORD dwNameSpace;
333 DWORD dwValueType;
334 DWORD dwValueSize;
335 LPVOID lpValue;
336 } WSANSCLASSINFOW, *PWSANSCLASSINFOW, *LPWSANSCLASSINFOW;
338 DECL_WINELIB_TYPE_AW(WSANSCLASSINFO)
339 DECL_WINELIB_TYPE_AW(PWSANSCLASSINFO)
340 DECL_WINELIB_TYPE_AW(LPWSANSCLASSINFO)
342 typedef struct _WSAServiceClassInfoA
344 LPGUID lpServiceClassId;
345 LPSTR lpszServiceClassName;
346 DWORD dwCount;
347 LPWSANSCLASSINFOA lpClassInfos;
348 } WSASERVICECLASSINFOA, *PWSASERVICECLASSINFOA, *LPWSASERVICECLASSINFOA;
350 typedef struct _WSAServiceClassInfoW
352 LPGUID lpServiceClassId;
353 LPWSTR lpszServiceClassName;
354 DWORD dwCount;
355 LPWSANSCLASSINFOW lpClassInfos;
356 } WSASERVICECLASSINFOW, *PWSASERVICECLASSINFOW, *LPWSASERVICECLASSINFOW;
359 DECL_WINELIB_TYPE_AW(WSASERVICECLASSINFO)
360 DECL_WINELIB_TYPE_AW(PWSASERVICECLASSINFO)
361 DECL_WINELIB_TYPE_AW(LPWSASERVICECLASSINFO)
363 #define WSAEVENT HANDLE
364 #define LPWSAEVENT LPHANDLE
365 #define WSAOVERLAPPED OVERLAPPED
366 typedef struct _OVERLAPPED* LPWSAOVERLAPPED;
368 #define WSA_IO_PENDING (ERROR_IO_PENDING)
369 #define WSA_IO_INCOMPLETE (ERROR_IO_INCOMPLETE)
370 #define WSA_INVALID_HANDLE (ERROR_INVALID_HANDLE)
371 #define WSA_INVALID_PARAMETER (ERROR_INVALID_PARAMETER)
372 #define WSA_NOT_ENOUGH_MEMORY (ERROR_NOT_ENOUGH_MEMORY)
373 #define WSA_OPERATION_ABORTED (ERROR_OPERATION_ABORTED)
375 #define WSA_INVALID_EVENT ((WSAEVENT)NULL)
376 #define WSA_MAXIMUM_WAIT_EVENTS (MAXIMUM_WAIT_OBJECTS)
377 #define WSA_WAIT_FAILED ((DWORD)-1)
378 #define WSA_WAIT_EVENT_0 (WAIT_OBJECT_0)
379 #define WSA_WAIT_IO_COMPLETION (WAIT_IO_COMPLETION)
380 #define WSA_WAIT_TIMEOUT (WAIT_TIMEOUT)
381 #define WSA_INFINITE (INFINITE)
383 typedef unsigned int GROUP;
384 #define SG_UNCONSTRAINED_GROUP 0x01
385 #define SG_CONSTRAINED_GROUP 0x02
388 * FLOWSPEC and SERVICETYPE should eventually move to qos.h
391 typedef ULONG SERVICETYPE;
393 typedef struct _FLOWSPEC {
394 unsigned int TokenRate;
395 unsigned int TokenBucketSize;
396 unsigned int PeakBandwidth;
397 unsigned int Latency;
398 unsigned int DelayVariation;
399 SERVICETYPE ServiceType;
400 unsigned int MaxSduSize;
401 unsigned int MinimumPolicedSize;
402 } FLOWSPEC, *PFLOWSPEC, *LPFLOWSPEC;
404 typedef struct _QUALITYOFSERVICE {
405 FLOWSPEC SendingFlowspec;
406 FLOWSPEC ReceivingFlowspec;
407 WSABUF ProviderSpecific;
408 } QOS, *LPQOS;
410 typedef int (CALLBACK *LPCONDITIONPROC)
412 LPWSABUF lpCallerId,
413 LPWSABUF lpCallerData,
414 LPQOS lpSQOS,
415 LPQOS lpGQOS,
416 LPWSABUF lpCalleeId,
417 LPWSABUF lpCalleeData,
418 GROUP *g,
419 DWORD_PTR dwCallbackData
422 typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE)
424 DWORD dwError,
425 DWORD cbTransferred,
426 LPWSAOVERLAPPED lpOverlapped,
427 DWORD dwFlags
430 #ifndef _tagBLOB_DEFINED
431 #define _tagBLOB_DEFINED
432 #define _BLOB_DEFINED
433 #define _LPBLOB_DEFINED
434 typedef struct _BLOB {
435 ULONG cbSize;
436 BYTE *pBlobData;
437 } BLOB, *LPBLOB;
438 #endif
440 /* addressfamily protocol pairs */
441 typedef struct _AFPROTOCOLS {
442 INT iAddressFamily;
443 INT iProtocol;
444 } AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS;
446 /* client query definitions */
447 typedef enum _WSAEcomparator {
448 COMP_EQUAL = 0,
449 COMP_NOTLESS
450 } WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR;
452 typedef struct _WSAVersion {
453 DWORD dwVersion;
454 WSAECOMPARATOR ecHow;
455 } WSAVERSION, *PWSAVERSION, *LPWSAVERSION;
458 typedef struct _WSAQuerySetA {
459 DWORD dwSize;
460 LPSTR lpszServiceInstanceName;
461 LPGUID lpServiceClassId;
462 LPWSAVERSION lpVersion;
463 LPSTR lpszComment;
464 DWORD dwNameSpace;
465 LPGUID lpNSProviderId;
466 LPSTR lpszContext;
467 DWORD dwNumberOfProtocols;
468 LPAFPROTOCOLS lpafpProtocols;
469 LPSTR lpszQueryString;
470 DWORD dwNumberOfCsAddrs;
471 LPCSADDR_INFO lpcsaBuffer;
472 DWORD dwOutputFlags;
473 LPBLOB lpBlob;
474 } WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA;
476 typedef struct _WSAQuerySetW {
477 DWORD dwSize;
478 LPWSTR lpszServiceInstanceName;
479 LPGUID lpServiceClassId;
480 LPWSAVERSION lpVersion;
481 LPWSTR lpszComment;
482 DWORD dwNameSpace;
483 LPGUID lpNSProviderId;
484 LPWSTR lpszContext;
485 DWORD dwNumberOfProtocols;
486 LPAFPROTOCOLS lpafpProtocols;
487 LPWSTR lpszQueryString;
488 DWORD dwNumberOfCsAddrs;
489 LPCSADDR_INFO lpcsaBuffer;
490 DWORD dwOutputFlags;
491 LPBLOB lpBlob;
492 } WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW;
494 DECL_WINELIB_TYPE_AW(WSAQUERYSET)
495 DECL_WINELIB_TYPE_AW(PWSAQUERYSET)
496 DECL_WINELIB_TYPE_AW(LPWSAQUERYSET)
498 typedef enum _WSAESETSERVICEOP {
499 RNRSERVICE_REGISTER = 0,
500 RNRSERVICE_DEREGISTER,
501 RNRSERVICE_DELETE
502 } WSAESETSERVICEOP, *PWSAESETSERVICEOP, *LPWSAESETSERVICEOP;
504 typedef struct _WSANAMESPACE_INFOA {
505 GUID NSProviderId;
506 DWORD dwNameSpace;
507 BOOL fActive;
508 DWORD dwVersion;
509 LPSTR lpszIdentifier;
510 } WSANAMESPACE_INFOA, *PWSANAMESPACE_INFOA, *LPWSANAMESPACE_INFOA;
512 typedef struct _WSANAMESPACE_INFOW {
513 GUID NSProviderId;
514 DWORD dwNameSpace;
515 BOOL fActive;
516 DWORD dwVersion;
517 LPWSTR lpszIdentifier;
518 } WSANAMESPACE_INFOW, *PWSANAMESPACE_INFOW, *LPWSANAMESPACE_INFOW;
520 DECL_WINELIB_TYPE_AW(WSANAMESPACE_INFO)
521 DECL_WINELIB_TYPE_AW(PWSANAMESPACE_INFO)
522 DECL_WINELIB_TYPE_AW(LPWSANAMESPACE_INFO)
524 typedef enum _WSACOMPLETIONTYPE {
525 NSP_NOTIFY_IMMEDIATELY = 0,
526 NSP_NOTIFY_HWND = 1,
527 NSP_NOTIFY_EVENT = 2,
528 NSP_NOTIFY_PORT = 3,
529 NSP_NOTIFY_APC = 4
530 } WSACOMPLETIONTYPE, * PWSACOMPLETIONTYPE, * LPWSACOMPLETIONTYPE;
532 typedef struct _WSACOMPLETION {
533 WSACOMPLETIONTYPE Type;
534 union {
535 struct {
536 HWND hWnd;
537 UINT uMsg;
538 WPARAM context;
539 } WindowMessage;
540 struct {
541 LPWSAOVERLAPPED lpOverlapped;
542 } Event;
543 struct {
544 LPWSAOVERLAPPED lpOverlapped;
545 LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
546 } Apc;
547 struct {
548 LPWSAOVERLAPPED lpOverlapped;
549 HANDLE hPort;
550 ULONG_PTR Key;
551 } Port;
552 } Parameters;
553 } WSACOMPLETION, *PWSACOMPLETION, *LPWSACOMPLETION;
556 * Winsock Function Typedefs
558 * Remember to keep this section in sync with the
559 * "Prototypes" section in winsock.h.
561 #if WS_API_TYPEDEFS
562 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYADDR)(HWND,WS(u_int),const char*,int,int,char*,int);
563 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETHOSTBYNAME)(HWND,WS(u_int),const char*,char*,int);
564 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNAME)(HWND,WS(u_int),const char*,char*,int);
565 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETPROTOBYNUMBER)(HWND,WS(u_int),int,char*,int);
566 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYNAME)(HWND,WS(u_int),const char*,const char*,char*,int);
567 typedef HANDLE (WINAPI *LPFN_WSAASYNCGETSERVBYPORT)(HWND,WS(u_int),int,const char*,char*,int);
568 typedef int (WINAPI *LPFN_WSAASYNCSELECT)(SOCKET,HWND,WS(u_int),LONG);
569 typedef int (WINAPI *LPFN_WSACANCELASYNCREQUEST)(HANDLE);
570 typedef int (WINAPI *LPFN_WSACANCELBLOCKINGCALL)(void);
571 typedef int (WINAPI *LPFN_WSACLEANUP)(void);
572 typedef int (WINAPI *LPFN_WSAGETLASTERROR)(void);
573 typedef BOOL (WINAPI *LPFN_WSAISBLOCKING)(void);
574 typedef FARPROC (WINAPI *LPFN_WSASETBLOCKINGHOOK)(FARPROC);
575 typedef void (WINAPI *LPFN_WSASETLASTERROR)(int);
576 typedef int (WINAPI *LPFN_WSASTARTUP)(WORD,LPWSADATA);
577 typedef int (WINAPI *LPFN_WSAUNHOOKBLOCKINGHOOK)(void);
579 typedef SOCKET (WINAPI *LPFN_ACCEPT)(SOCKET,struct WS(sockaddr)*,int*);
580 typedef int (WINAPI *LPFN_BIND)(SOCKET,const struct WS(sockaddr)*,int);
581 typedef int (WINAPI *LPFN_CLOSESOCKET)(SOCKET);
582 typedef int (WINAPI *LPFN_CONNECT)(SOCKET,const struct WS(sockaddr)*,int);
583 typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYADDR)(const char*,int,int);
584 typedef struct WS(hostent)* (WINAPI *LPFN_GETHOSTBYNAME)(const char*);
585 typedef int (WINAPI *LPFN_GETHOSTNAME)(char*,int);
586 typedef int (WINAPI *LPFN_GETPEERNAME)(SOCKET,struct WS(sockaddr)*,int*);
587 typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNAME)(const char*);
588 typedef struct WS(protoent)* (WINAPI *LPFN_GETPROTOBYNUMBER)(int);
589 #ifdef WS_DEFINE_SELECT
590 typedef int (WINAPI* LPFN_SELECT)(int,WS(fd_set)*,WS(fd_set)*,WS(fd_set)*,const struct WS(timeval)*);
591 #endif
592 typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYNAME)(const char*,const char*);
593 typedef struct WS(servent)* (WINAPI *LPFN_GETSERVBYPORT)(int,const char*);
594 typedef int (WINAPI *LPFN_GETSOCKNAME)(SOCKET,struct WS(sockaddr)*,int*);
595 typedef int (WINAPI *LPFN_GETSOCKOPT)(SOCKET,int,int,char*,int*);
596 typedef ULONG (WINAPI *LPFN_HTONL)(ULONG);
597 typedef WS(u_short) (WINAPI *LPFN_HTONS)(WS(u_short));
598 typedef ULONG (WINAPI *LPFN_INET_ADDR)(const char*);
599 typedef char* (WINAPI *LPFN_INET_NTOA)(struct WS(in_addr));
600 typedef int (WINAPI *LPFN_IOCTLSOCKET)(SOCKET,LONG,ULONG*);
601 typedef int (WINAPI *LPFN_LISTEN)(SOCKET,int);
602 typedef ULONG (WINAPI *LPFN_NTOHL)(ULONG);
603 typedef WS(u_short) (WINAPI *LPFN_NTOHS)(WS(u_short));
604 typedef int (WINAPI *LPFN_RECV)(SOCKET,char*,int,int);
605 typedef int (WINAPI *LPFN_RECVFROM)(SOCKET,char*,int,int,struct WS(sockaddr)*,int*);
606 typedef int (WINAPI *LPFN_SEND)(SOCKET,const char*,int,int);
607 typedef int (WINAPI *LPFN_SENDTO)(SOCKET,const char*,int,int,const struct WS(sockaddr)*,int);
608 typedef int (WINAPI *LPFN_SETSOCKOPT)(SOCKET,int,int,const char*,int);
609 typedef int (WINAPI *LPFN_SHUTDOWN)(SOCKET,int);
610 typedef SOCKET (WINAPI *LPFN_SOCKET)(int,int,int);
611 #endif /* WS_API_TYPEDEFS */
616 * Winsock2 Prototypes
618 * Remember to keep this section in sync with the
619 * "Winsock2 Function Typedefs" section below.
621 #if WS_API_PROTOTYPES
622 SOCKET WINAPI WSAAccept(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
623 INT WINAPI WSAAddressToStringA(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
624 INT WINAPI WSAAddressToStringW(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
625 #define WSAAddressToString WINELIB_NAME_AW(WSAAddressToString)
626 BOOL WINAPI WSACloseEvent(WSAEVENT);
627 int WINAPI WSAConnect(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
628 WSAEVENT WINAPI WSACreateEvent(void);
629 INT WINAPI WSADuplicateSocketA(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
630 INT WINAPI WSADuplicateSocketW(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
631 #define WSADuplicateSocket WINELIB_NAME_AW(WSADuplicateSocket)
632 INT WINAPI WSAEnumNameSpaceProvidersA(LPDWORD,LPWSANAMESPACE_INFOA);
633 INT WINAPI WSAEnumNameSpaceProvidersW(LPDWORD,LPWSANAMESPACE_INFOW);
634 #define WSAEnumNameSpaceProviders WINELIB_NAME_AW(WSAEnumNameSpaceProviders)
635 int WINAPI WSAEnumNetworkEvents(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
636 int WINAPI WSAEnumProtocolsA(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
637 int WINAPI WSAEnumProtocolsW(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
638 #define WSAEnumProtocols WINELIB_NAME_AW(WSAEnumProtocols)
639 int WINAPI WSAEventSelect(SOCKET,WSAEVENT,LONG);
640 BOOL WINAPI WSAGetOverlappedResult(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
641 BOOL WINAPI WSAGetQOSByName(SOCKET,LPWSABUF,LPQOS);
642 INT WINAPI WSAGetServiceClassInfoA(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
643 INT WINAPI WSAGetServiceClassInfoW(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
644 #define WSAGetServiceClassInfo WINELIB_NAME_AW(WSAGetServiceClassInfo)
645 INT WINAPI WSAGetServiceClassNameByClassIdA(LPGUID,LPSTR,LPDWORD);
646 INT WINAPI WSAGetServiceClassNameByClassIdW(LPGUID,LPWSTR,LPDWORD);
647 #define WSAGetServiceClassNameByClassId WINELIB_NAME_AW(WSAGetServiceClassNameByClassId)
648 int WINAPI WSAHtonl(SOCKET,ULONG,ULONG*);
649 int WINAPI WSAHtons(SOCKET,WS(u_short),WS(u_short)*);
650 int WINAPI WSAInstallServiceClassA(LPWSASERVICECLASSINFOA);
651 int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW);
652 #define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass)
653 int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
654 SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
655 INT WINAPI WSALookupServiceBeginA(LPWSAQUERYSETA,DWORD,LPHANDLE);
656 INT WINAPI WSALookupServiceBeginW(LPWSAQUERYSETW,DWORD,LPHANDLE);
657 #define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin)
658 INT WINAPI WSALookupServiceEnd(HANDLE);
659 INT WINAPI WSALookupServiceNextA(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
660 INT WINAPI WSALookupServiceNextW(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
661 #define WSALookupServiceNext WINELIB_NAME_AW(WSALookupServiceNext)
662 int WINAPI WSANSPIoctl(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
663 int WINAPI WSANtohl(SOCKET,ULONG,ULONG*);
664 int WINAPI WSANtohs(SOCKET,WS(u_short),WS(u_short)*);
665 INT WINAPI WSAProviderConfigChange(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
666 int WINAPI WSARecv(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
667 int WINAPI WSARecvDisconnect(SOCKET,LPWSABUF);
668 int WINAPI WSARecvFrom(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
669 INT WINAPI WSARemoveServiceClass(LPGUID);
670 BOOL WINAPI WSAResetEvent(WSAEVENT);
671 int WINAPI WSASend(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
672 int WINAPI WSASendDisconnect(SOCKET,LPWSABUF);
673 int WINAPI WSASendTo(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
674 BOOL WINAPI WSASetEvent(WSAEVENT);
675 INT WINAPI WSASetServiceA(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
676 INT WINAPI WSASetServiceW(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
677 #define WSASetService WINELIB_NAME_AW(WSASetService)
678 SOCKET WINAPI WSASocketA(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
679 SOCKET WINAPI WSASocketW(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
680 #define WSASocket WINELIB_NAME_AW(WSASocket)
681 INT WINAPI WSAStringToAddressA(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
682 INT WINAPI WSAStringToAddressW(LPWSTR,INT,LPWSAPROTOCOL_INFOW,LPSOCKADDR,LPINT);
683 #define WSAStringToAddress WINELIB_NAME_AW(WSAStringToAddress)
684 DWORD WINAPI WSAWaitForMultipleEvents(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
685 #endif /* WS_API_PROTOTYPES */
690 * Winsock2 Function Typedefs
692 * Remember to keep this section in sync with the
693 * "Winsock2 Prototypes" section above.
695 #if WS_API_TYPEDEFS
696 typedef SOCKET (WINAPI *LPFN_WSAACCEPT)(SOCKET,struct WS(sockaddr)*,LPINT,LPCONDITIONPROC,DWORD_PTR);
697 typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGA)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOA,LPSTR,LPDWORD);
698 typedef INT (WINAPI *LPFN_WSAADDRESSTOSTRINGW)(LPSOCKADDR,DWORD,LPWSAPROTOCOL_INFOW,LPWSTR,LPDWORD);
699 #define LPFN_WSAADDRESSTOSTRING WINELIB_NAME_AW(LPFN_WSAADDRESSTOSTRING)
700 typedef BOOL (WINAPI *LPFN_WSACLOSEEVENT)(WSAEVENT);
701 typedef int (WINAPI *LPFN_WSACONNECT)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS);
702 typedef WSAEVENT (WINAPI *LPFN_WSACREATEEVENT)(void);
703 typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETA)(SOCKET,DWORD,LPWSAPROTOCOL_INFOA);
704 typedef INT (WINAPI *LPFN_WSADUPLICATESOCKETW)(SOCKET,DWORD,LPWSAPROTOCOL_INFOW);
705 #define LPFN_WSADUPLICATESOCKET WINELIB_NAME_AW(LPFN_WSADUPLICATESOCKET)
706 typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSA)(LPDWORD,LPWSANAMESPACE_INFOA);
707 typedef INT (WINAPI *LPFN_WSAENUMNAMESPACEPROVIDERSW)(LPDWORD,LPWSANAMESPACE_INFOW);
708 #define LPFN_WSAENUMNAMESPACEPROVIDERS WINELIB_NAME_AW(LPFN_WSAENUMNAMESPACEPROVIDERS)
709 typedef int (WINAPI *LPFN_WSAENUMNETWORKEVENTS)(SOCKET,WSAEVENT,LPWSANETWORKEVENTS);
710 typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSA)(LPINT,LPWSAPROTOCOL_INFOA,LPDWORD);
711 typedef int (WINAPI *LPFN_WSAENUMPROTOCOLSW)(LPINT,LPWSAPROTOCOL_INFOW,LPDWORD);
712 #define LPFN_WSAENUMPROTOCOLS WINELIB_NAME_AW(LPFN_WSAENUMPROTOCOLS)
713 typedef int (WINAPI *LPFN_WSAEVENTSELECT)(SOCKET,WSAEVENT,LONG);
714 typedef BOOL (WINAPI *LPFN_WSAGETOVERLAPPEDRESULT)(SOCKET,LPWSAOVERLAPPED,LPDWORD,BOOL,LPDWORD);
715 typedef BOOL (WINAPI *LPFN_WSAGETQOSBYNAME)(SOCKET,LPWSABUF,LPQOS);
716 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOA)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOA);
717 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSINFOW)(LPGUID,LPGUID,LPDWORD,LPWSASERVICECLASSINFOW);
718 #define LPFN_LPFNWSAGETSERVICECLASSINFO WINELIB_NAME_AW(LPFN_LPFNWSAGETSERVICECLASSINFO)
719 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA)(LPGUID,LPSTR,LPDWORD);
720 typedef INT (WINAPI *LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW)(LPGUID,LPWSTR,LPDWORD);
721 #define LPFN_WSAGETSERVICECLASSNAMEBYCLASSID WINELIB_NAME_AW(LPFN_WSAGETSERVICECLASSNAMEBYCLASSID)
722 typedef int (WINAPI *LPFN_WSAHTONL)(SOCKET,ULONG,ULONG*);
723 typedef int (WINAPI *LPFN_WSAHTONS)(SOCKET,WS(u_short),WS(u_short)*);
724 typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSA)(LPWSASERVICECLASSINFOA);
725 typedef int (WINAPI *LPFN_WSAINSTALLSERVICECLASSW)(LPWSASERVICECLASSINFOW);
726 typedef int (WINAPI *LPFN_WSAIOCTL)(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
727 typedef int (WINAPI *LPFN_WSAJOINLEAF)(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD);
728 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINA)(LPWSAQUERYSETA,DWORD,LPHANDLE);
729 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEBEGINW)(LPWSAQUERYSETW,DWORD,LPHANDLE);
730 #define LPFN_WSALOOKUPSERVICEBEGIN WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICEBEGIN)
731 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICEEND)(HANDLE);
732 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTA)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETA);
733 typedef INT (WINAPI *LPFN_WSALOOKUPSERVICENEXTW)(HANDLE,DWORD,LPDWORD,LPWSAQUERYSETW);
734 #define LPFN_WSALOOKUPSERVICENEXT WINELIB_NAME_AW(LPFN_WSALOOKUPSERVICENEXT)
735 typedef int (WINAPI *LPFN_WSANSPIOCTL)(HANDLE,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSACOMPLETION);
736 typedef int (WINAPI *LPFN_WSANTOHL)(SOCKET,ULONG,ULONG*);
737 typedef int (WINAPI *LPFN_WSANTOHS)(SOCKET,WS(u_short),WS(u_short)*);
738 typedef INT (WINAPI *LPFN_WSAPROVIDERCONFIGCHANGE)(LPHANDLE,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
739 typedef int (WINAPI *LPFN_WSARECV)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
740 typedef int (WINAPI *LPFN_WSARECVDISCONNECT)(SOCKET,LPWSABUF);
741 typedef int (WINAPI *LPFN_WSARECVFROM)(SOCKET,LPWSABUF,DWORD,LPDWORD,LPDWORD,struct WS(sockaddr)*,LPINT,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
742 typedef INT (WINAPI *LPFN_WSAREMOVESERVICECLASS)(LPGUID);
743 typedef BOOL (WINAPI *LPFN_WSARESETEVENT)(WSAEVENT);
744 typedef int (WINAPI *LPFN_WSASEND)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
745 typedef int (WINAPI *LPFN_WSASENDDISCONNECT)(SOCKET,LPWSABUF);
746 typedef int (WINAPI *LPFN_WSASENDTO)(SOCKET,LPWSABUF,DWORD,LPDWORD,DWORD,const struct WS(sockaddr)*,int,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE);
747 typedef BOOL (WINAPI *LPFN_WSASETEVENT)(WSAEVENT);
748 typedef INT (WINAPI *LPFN_WSASETSERVICEA)(LPWSAQUERYSETA,WSAESETSERVICEOP,DWORD);
749 typedef INT (WINAPI *LPFN_WSASETSERVICEW)(LPWSAQUERYSETW,WSAESETSERVICEOP,DWORD);
750 #define LPFN_WSASETSERVICE WINELIB_NAME_AW(LPFN_WSASETSERVICE)
751 typedef SOCKET (WINAPI *LPFN_WSASOCKETA)(int,int,int,LPWSAPROTOCOL_INFOA,GROUP,DWORD);
752 typedef SOCKET (WINAPI *LPFN_WSASOCKETW)(int,int,int,LPWSAPROTOCOL_INFOW,GROUP,DWORD);
753 typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSA)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
754 typedef INT (WINAPI *LPFN_WSASTRINGTOADDRESSW)(LPSTR,INT,LPWSAPROTOCOL_INFOA,LPSOCKADDR,LPINT);
755 #define LPFN_WSASOCKET WINELIB_NAME_AW(LPFN_WSASOCKET)
756 #define LPFN_WSASTRINGTOADDRESS WINELIB_NAME_AW(LPFN_WSASTRINGTOADDRESS)
757 typedef DWORD (WINAPI *LPFN_WSAWAITFORMULTIPLEEVENTS)(DWORD,const WSAEVENT*,BOOL,DWORD,BOOL);
758 #endif /* WS_API_TYPEDEFS */
761 /* Condition function return values */
762 #define CF_ACCEPT 0x0000
763 #define CF_REJECT 0x0001
764 #define CF_DEFER 0x0002
766 #ifdef __cplusplus
768 #endif
770 #undef WS
771 #undef WS_API_PROTOTYPES
772 #undef WS_API_TYPEDEFS
774 #endif /* __WINSOCK2API__ */