1 /* Async WINSOCK DNS services
3 * Copyright (C) 1993,1994,1996,1997 John Brezak, Erik Bos, Alex Korobka.
4 * Copyright (C) 1999 Marcus Meissner
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 * NOTE: If you make any changes to fix a particular app, make sure
21 * they don't break something else like Netscape or telnet and ftp
22 * clients and servers (www.winsite.com got a lot of those).
25 * - Add WSACancel* and correct handle management. (works rather well for
27 * - Verify & Check all calls for correctness
28 * (currently only WSAGetHostByName*, WSAGetServByPort* calls)
29 * - Check error returns.
30 * - mirc/mirc32 Finger @linux.kernel.org sometimes fails in threaded mode.
32 * - This implementation did ignore the "NOTE:" section above (since the
33 * whole stuff did not work anyway to other changes).
37 #include "wine/port.h"
40 #include <sys/types.h>
44 #ifdef HAVE_SYS_IOCTL_H
45 # include <sys/ioctl.h>
47 #ifdef HAVE_SYS_FILIO_H
48 # include <sys/filio.h>
51 #include <sys/ioccom.h>
52 #ifdef HAVE_SYS_SOCKIO_H
53 # include <sys/sockio.h>
58 # include <sys/so_ioctl.h>
61 #ifdef HAVE_SYS_PARAM_H
62 # include <sys/param.h>
68 #ifdef HAVE_SYS_WAIT_H
71 #ifdef HAVE_SYS_SOCKET_H
72 #include <sys/socket.h>
74 #ifdef HAVE_NETINET_IN_H
75 # include <netinet/in.h>
77 #ifdef HAVE_ARPA_INET_H
78 # include <arpa/inet.h>
83 #ifdef HAVE_SYS_ERRNO_H
84 #include <sys/errno.h>
93 #ifdef HAVE_ARPA_NAMESER_H
94 # include <arpa/nameser.h>
100 #include "wine/winbase16.h"
103 #include "winsock2.h"
106 #include "wine/winsock16.h"
109 #include "wine/debug.h"
111 WINE_DEFAULT_DEBUG_CHANNEL(winsock);
114 /* critical section to protect some non-rentrant net function */
115 CRITICAL_SECTION csWSgetXXXbyYYY = CRITICAL_SECTION_INIT("csWSgetXXXbyYYY");
117 /* protoptypes of some functions in socket.c
119 UINT16 wsaErrno(void);
120 UINT16 wsaHerrno(int errnr);
122 #define AQ_WIN16 0x00
123 #define AQ_WIN32 0x04
124 #define HB_WIN32(hb) (hb->flags & AQ_WIN32)
125 #define AQ_NUMBER 0x00
127 #define AQ_COPYPTR1 0x10
128 #define AQ_DUPLOWPTR1 0x20
129 #define AQ_MASKPTR1 0x30
130 #define AQ_COPYPTR2 0x40
131 #define AQ_DUPLOWPTR2 0x80
132 #define AQ_MASKPTR2 0xC0
135 #define AQ_GETPROTO 1
139 /* The handles used are pseudo-handles that can be simply casted. */
140 /* 16-bit values are used internally (to be sure handle comparison works right in 16-bit apps). */
141 #define WSA_H32(h16) ((HANDLE)(ULONG_PTR)(h16))
143 /* ----------------------------------- helper functions - */
145 static int list_size(char** l, int item_size)
150 j += (item_size) ? item_size : strlen(l[i]) + 1;
151 j += (i + 1) * sizeof(char*); }
155 static int list_dup(char** l_src, char* ref, char* base, int item_size)
157 /* base is either either equal to ref or 0 or SEGPTR */
160 char** l_to = (char**)ref;
163 for(j=0;l_src[j];j++) ;
164 p += (j + 1) * sizeof(char*);
166 { l_to[i] = base + (p - ref);
167 k = ( item_size ) ? item_size : strlen(l_src[i]) + 1;
168 memcpy(p, l_src[i], k); p += k; }
175 static int hostent_size(struct hostent* p_he)
179 { size = sizeof(struct hostent);
180 size += strlen(p_he->h_name) + 1;
181 size += list_size(p_he->h_aliases, 0);
182 size += list_size(p_he->h_addr_list, p_he->h_length ); }
186 /* Copy hostent to p_to, fix up inside pointers using p_base (different for
187 * Win16 (linear vs. segmented). Return -neededsize on overrun.
189 static int WS_copy_he(char *p_to,char *p_base,int t_size,struct hostent* p_he, int flag)
191 char* p_name,*p_aliases,*p_addr,*p;
192 struct ws_hostent16 *p_to16 = (struct ws_hostent16*)p_to;
193 struct WS_hostent *p_to32 = (struct WS_hostent*)p_to;
194 int size = hostent_size(p_he) +
196 (flag & AQ_WIN16) ? sizeof(struct ws_hostent16) : sizeof(struct WS_hostent)
197 - sizeof(struct hostent)
203 p += (flag & AQ_WIN16) ?
204 sizeof(struct ws_hostent16) : sizeof(struct WS_hostent);
206 strcpy(p, p_he->h_name); p += strlen(p) + 1;
208 p += list_dup(p_he->h_aliases, p, p_base + (p - (char*)p_to), 0);
210 list_dup(p_he->h_addr_list, p, p_base + (p - (char*)p_to), p_he->h_length);
214 p_to16->h_addrtype = (INT16)p_he->h_addrtype;
215 p_to16->h_length = (INT16)p_he->h_length;
216 p_to16->h_name = (SEGPTR)(p_base + (p_name - p_to));
217 p_to16->h_aliases = (SEGPTR)(p_base + (p_aliases - p_to));
218 p_to16->h_addr_list = (SEGPTR)(p_base + (p_addr - p_to));
222 p_to32->h_addrtype = p_he->h_addrtype;
223 p_to32->h_length = p_he->h_length;
224 p_to32->h_name = (p_base + (p_name - p_to));
225 p_to32->h_aliases = (char **)(p_base + (p_aliases - p_to));
226 p_to32->h_addr_list = (char **)(p_base + (p_addr - p_to));
234 static int protoent_size(struct protoent* p_pe)
238 { size = sizeof(struct protoent);
239 size += strlen(p_pe->p_name) + 1;
240 size += list_size(p_pe->p_aliases, 0); }
244 /* Copy protoent to p_to, fix up inside pointers using p_base (different for
245 * Win16 (linear vs. segmented). Return -neededsize on overrun.
247 static int WS_copy_pe(char *p_to,char *p_base,int t_size,struct protoent* p_pe, int flag)
249 char* p_name,*p_aliases,*p;
250 struct ws_protoent16 *p_to16 = (struct ws_protoent16*)p_to;
251 struct WS_protoent *p_to32 = (struct WS_protoent*)p_to;
252 int size = protoent_size(p_pe) +
254 (flag & AQ_WIN16) ? sizeof(struct ws_protoent16) : sizeof(struct WS_protoent)
255 - sizeof(struct protoent)
261 p += (flag & AQ_WIN16) ?
262 sizeof(struct ws_protoent16) : sizeof(struct WS_protoent);
264 strcpy(p, p_pe->p_name); p += strlen(p) + 1;
266 list_dup(p_pe->p_aliases, p, p_base + (p - (char*)p_to), 0);
270 p_to16->p_proto = (INT16)p_pe->p_proto;
271 p_to16->p_name = (SEGPTR)(p_base) + (p_name - p_to);
272 p_to16->p_aliases = (SEGPTR)((p_base) + (p_aliases - p_to));
276 p_to32->p_proto = p_pe->p_proto;
277 p_to32->p_name = (p_base) + (p_name - p_to);
278 p_to32->p_aliases = (char **)((p_base) + (p_aliases - p_to));
286 static int servent_size(struct servent* p_se)
290 size += sizeof(struct servent);
291 size += strlen(p_se->s_proto) + strlen(p_se->s_name) + 2;
292 size += list_size(p_se->s_aliases, 0);
297 /* Copy servent to p_to, fix up inside pointers using p_base (different for
298 * Win16 (linear vs. segmented). Return -neededsize on overrun.
299 * Take care of different Win16/Win32 servent structs (packing !)
301 static int WS_copy_se(char *p_to,char *p_base,int t_size,struct servent* p_se, int flag)
303 char* p_name,*p_aliases,*p_proto,*p;
304 struct ws_servent16 *p_to16 = (struct ws_servent16*)p_to;
305 struct WS_servent *p_to32 = (struct WS_servent*)p_to;
306 int size = servent_size(p_se) +
308 (flag & AQ_WIN16) ? sizeof(struct ws_servent16) : sizeof(struct WS_servent)
309 - sizeof(struct servent)
315 p += (flag & AQ_WIN16) ?
316 sizeof(struct ws_servent16) : sizeof(struct WS_servent);
318 strcpy(p, p_se->s_name); p += strlen(p) + 1;
320 strcpy(p, p_se->s_proto); p += strlen(p) + 1;
322 list_dup(p_se->s_aliases, p, p_base + (p - p_to), 0);
326 p_to16->s_port = (INT16)p_se->s_port;
327 p_to16->s_name = (SEGPTR)(p_base + (p_name - p_to));
328 p_to16->s_proto = (SEGPTR)(p_base + (p_proto - p_to));
329 p_to16->s_aliases = (SEGPTR)(p_base + (p_aliases - p_to));
333 p_to32->s_port = p_se->s_port;
334 p_to32->s_name = (p_base + (p_name - p_to));
335 p_to32->s_proto = (p_base + (p_proto - p_to));
336 p_to32->s_aliases = (char **)(p_base + (p_aliases - p_to));
342 static HANDLE16 __ws_async_handle = 0xdead;
344 /* Generic async query struct. we use symbolic names for the different queries
347 typedef struct _async_query {
351 #define host_name ptr1
352 #define host_addr ptr1
353 #define serv_name ptr1
354 #define proto_name ptr1
356 #define serv_proto ptr2
358 #define host_len int1
359 #define proto_number int1
360 #define serv_port int1
362 #define host_type int2
366 HANDLE16 async_handle;
373 /****************************************************************************
374 * The async query function.
376 * It is either called as a thread startup routine or directly. It has
377 * to free the passed arg from the process heap and PostMessageA the async
378 * result or the error code.
381 * - errorhandling not verified.
383 static DWORD WINAPI _async_queryfun(LPVOID arg) {
384 async_query *aq = (async_query*)arg;
387 char *targetptr = (HB_WIN32(aq)?(char*)aq->sbuf:(char*)MapSL(aq->sbuf));
389 switch (aq->flags & AQ_GETMASK) {
392 char *copy_hostent = targetptr;
393 #if HAVE_LINUX_GETHOSTBYNAME_R_6
396 struct hostent hostentry;
397 int locerr = ENOBUFS;
399 extrabuf=HeapAlloc(GetProcessHeap(),0,ebufsize) ;
401 int res = (aq->flags & AQ_NAME) ?
402 gethostbyname_r(aq->host_name,
403 &hostentry, extrabuf, ebufsize, &he, &locerr):
404 gethostbyaddr_r(aq->host_addr,aq->host_len,aq->host_type,
405 &hostentry, extrabuf, ebufsize, &he, &locerr);
406 if( res != ERANGE) break;
408 extrabuf=HeapReAlloc(GetProcessHeap(),0,extrabuf,ebufsize) ;
410 if (!he) fail = ((locerr < 0) ? wsaErrno() : wsaHerrno(locerr));
412 EnterCriticalSection( &csWSgetXXXbyYYY );
413 he = (aq->flags & AQ_NAME) ?
414 gethostbyname(aq->host_name):
415 gethostbyaddr(aq->host_addr,aq->host_len,aq->host_type);
416 if (!he) fail = ((h_errno < 0) ? wsaErrno() : wsaHerrno(h_errno));
419 size = WS_copy_he(copy_hostent,(char*)aq->sbuf,aq->sbuflen,he,aq->flags);
425 #if HAVE_LINUX_GETHOSTBYNAME_R_6
426 HeapFree(GetProcessHeap(),0,extrabuf);
428 LeaveCriticalSection( &csWSgetXXXbyYYY );
433 #if defined(HAVE_GETPROTOBYNAME) && defined(HAVE_GETPROTOBYNUMBER)
435 char *copy_protoent = targetptr;
436 EnterCriticalSection( &csWSgetXXXbyYYY );
437 pe = (aq->flags & AQ_NAME)?
438 getprotobyname(aq->proto_name) :
439 getprotobynumber(aq->proto_number);
441 size = WS_copy_pe(copy_protoent,(char*)aq->sbuf,aq->sbuflen,pe,aq->flags);
447 if (aq->flags & AQ_NAME)
448 MESSAGE("protocol %s not found; You might want to add "
449 "this to /etc/protocols\n", debugstr_a(aq->proto_name) );
451 MESSAGE("protocol number %d not found; You might want to add "
452 "this to /etc/protocols\n", aq->proto_number );
455 LeaveCriticalSection( &csWSgetXXXbyYYY );
463 char *copy_servent = targetptr;
464 EnterCriticalSection( &csWSgetXXXbyYYY );
465 se = (aq->flags & AQ_NAME)?
466 getservbyname(aq->serv_name,aq->serv_proto) :
467 #ifdef HAVE_GETSERVBYPORT
468 getservbyport(aq->serv_port,aq->serv_proto);
473 size = WS_copy_se(copy_servent,(char*)aq->sbuf,aq->sbuflen,se,aq->flags);
479 if (aq->flags & AQ_NAME)
480 MESSAGE("service %s protocol %s not found; You might want to add "
481 "this to /etc/services\n", debugstr_a(aq->serv_name) ,
482 aq->serv_proto ? debugstr_a(aq->serv_proto ):"*");
484 MESSAGE("service on port %d protocol %s not found; You might want to add "
485 "this to /etc/services\n", aq->serv_port,
486 aq->serv_proto ? debugstr_a(aq->serv_proto ):"*");
489 LeaveCriticalSection( &csWSgetXXXbyYYY );
493 PostMessageA(HWND_32(aq->hWnd),aq->uMsg,(WPARAM) aq->async_handle,size|(fail<<16));
494 HeapFree(GetProcessHeap(),0,arg);
498 /****************************************************************************
499 * The main async help function.
501 * It either starts a thread or just calls the function directly for platforms
502 * with no thread support. This relies on the fact that PostMessage() does
503 * not actually call the windowproc before the function returns.
505 static HANDLE16 __WSAsyncDBQuery(
506 HWND hWnd, UINT uMsg,INT int1,LPCSTR ptr1, INT int2, LPCSTR ptr2,
507 void *sbuf, INT sbuflen, UINT flags
515 /* allocate buffer to copy protocol- and service name to */
516 /* note: this is done in the calling thread so we can return */
517 /* a decent error code if the Alloc fails */
519 switch (flags & AQ_MASKPTR1) {
521 case AQ_COPYPTR1: xbuflen += int1; break;
522 case AQ_DUPLOWPTR1: xbuflen += strlen(ptr1) + 1; break;
525 switch (flags & AQ_MASKPTR2) {
527 case AQ_COPYPTR2: xbuflen += int2; break;
528 case AQ_DUPLOWPTR2: xbuflen += strlen(ptr2) + 1; break;
531 if(!(aq = HeapAlloc(GetProcessHeap(),0,sizeof(async_query) + xbuflen))) {
532 SetLastError(WSAEWOULDBLOCK); /* insufficient resources */
537 if (ptr1) switch (flags & AQ_MASKPTR1) {
539 case AQ_COPYPTR1: memcpy(pto, ptr1, int1); ptr1 = pto; pto += int1; break;
540 case AQ_DUPLOWPTR1: pfm = ptr1; ptr1 = pto; do *pto++ = tolower(*pfm); while (*pfm++); break;
542 if (ptr2) switch (flags & AQ_MASKPTR2) {
544 case AQ_COPYPTR2: memcpy(pto, ptr2, int2); ptr2 = pto; pto += int2; break;
545 case AQ_DUPLOWPTR2: pfm = ptr2; ptr2 = pto; do *pto++ = tolower(*pfm); while (*pfm++); break;
548 aq->hWnd = HWND_16(hWnd);
554 /* avoid async_handle = 0 */
555 aq->async_handle = (++__ws_async_handle ? __ws_async_handle : ++__ws_async_handle);
557 aq->sbuf = (SEGPTR)sbuf;
558 aq->sbuflen = sbuflen;
561 if (CreateThread(NULL,0,_async_queryfun,aq,0,NULL) == INVALID_HANDLE_VALUE)
564 return __ws_async_handle;
568 /***********************************************************************
569 * WSAAsyncGetHostByAddr (WINSOCK.102)
571 HANDLE16 WINAPI WSAAsyncGetHostByAddr16(HWND16 hWnd, UINT16 uMsg, LPCSTR addr,
572 INT16 len, INT16 type, SEGPTR sbuf, INT16 buflen)
574 TRACE("hwnd %04x, msg %04x, addr %08x[%i]\n",
575 hWnd, uMsg, (unsigned)addr , len );
576 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,len,addr,type,NULL,
578 AQ_NUMBER|AQ_COPYPTR1|AQ_WIN16|AQ_GETHOST);
581 /***********************************************************************
582 * WSAAsyncGetHostByAddr (WS2_32.102)
584 HANDLE WINAPI WSAAsyncGetHostByAddr(HWND hWnd, UINT uMsg, LPCSTR addr,
585 INT len, INT type, LPSTR sbuf, INT buflen)
587 TRACE("hwnd %p, msg %04x, addr %08x[%i]\n",
588 hWnd, uMsg, (unsigned)addr , len );
589 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,len,addr,type,NULL,sbuf,buflen,
590 AQ_NUMBER|AQ_COPYPTR1|AQ_WIN32|AQ_GETHOST));
593 /***********************************************************************
594 * WSAAsyncGetHostByName (WINSOCK.103)
596 HANDLE16 WINAPI WSAAsyncGetHostByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
597 SEGPTR sbuf, INT16 buflen)
599 TRACE("hwnd %04x, msg %04x, host %s, buffer %i\n",
600 hWnd, uMsg, (name)?name:"<null>", (int)buflen );
601 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,NULL,
603 AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN16|AQ_GETHOST);
606 /***********************************************************************
607 * WSAAsyncGetHostByName (WS2_32.103)
609 HANDLE WINAPI WSAAsyncGetHostByName(HWND hWnd, UINT uMsg, LPCSTR name,
610 LPSTR sbuf, INT buflen)
612 TRACE("hwnd %p, msg %08x, host %s, buffer %i\n",
613 hWnd, uMsg, (name)?name:"<null>", (int)buflen );
614 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,sbuf,buflen,
615 AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN32|AQ_GETHOST));
618 /***********************************************************************
619 * WSAAsyncGetProtoByName (WINSOCK.105)
621 HANDLE16 WINAPI WSAAsyncGetProtoByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
622 SEGPTR sbuf, INT16 buflen)
624 TRACE("hwnd %04x, msg %08x, protocol %s\n",
625 hWnd, uMsg, (name)?name:"<null>" );
626 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,NULL,
628 AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN16|AQ_GETPROTO);
631 /***********************************************************************
632 * WSAAsyncGetProtoByName (WS2_32.105)
634 HANDLE WINAPI WSAAsyncGetProtoByName(HWND hWnd, UINT uMsg, LPCSTR name,
635 LPSTR sbuf, INT buflen)
637 TRACE("hwnd %p, msg %08x, protocol %s\n",
638 hWnd, uMsg, (name)?name:"<null>" );
639 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,0,name,0,NULL,sbuf,buflen,
640 AQ_NAME|AQ_DUPLOWPTR1|AQ_WIN32|AQ_GETPROTO));
644 /***********************************************************************
645 * WSAAsyncGetProtoByNumber (WINSOCK.104)
647 HANDLE16 WINAPI WSAAsyncGetProtoByNumber16(HWND16 hWnd,UINT16 uMsg,INT16 number,
648 SEGPTR sbuf, INT16 buflen)
650 TRACE("hwnd %04x, msg %04x, num %i\n", hWnd, uMsg, number );
651 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,number,NULL,0,NULL,
653 AQ_GETPROTO|AQ_NUMBER|AQ_WIN16);
656 /***********************************************************************
657 * WSAAsyncGetProtoByNumber (WS2_32.104)
659 HANDLE WINAPI WSAAsyncGetProtoByNumber(HWND hWnd, UINT uMsg, INT number,
660 LPSTR sbuf, INT buflen)
662 TRACE("hwnd %p, msg %04x, num %i\n", hWnd, uMsg, number );
663 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,number,NULL,0,NULL,sbuf,buflen,
664 AQ_GETPROTO|AQ_NUMBER|AQ_WIN32));
667 /***********************************************************************
668 * WSAAsyncGetServByName (WINSOCK.107)
670 HANDLE16 WINAPI WSAAsyncGetServByName16(HWND16 hWnd, UINT16 uMsg, LPCSTR name,
671 LPCSTR proto, SEGPTR sbuf, INT16 buflen)
673 TRACE("hwnd %04x, msg %04x, name %s, proto %s\n",
674 hWnd, uMsg, (name)?name:"<null>", (proto)?proto:"<null>");
675 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,0,name,0,proto,
677 AQ_GETSERV|AQ_NAME|AQ_DUPLOWPTR1|AQ_DUPLOWPTR2|AQ_WIN16);
680 /***********************************************************************
681 * WSAAsyncGetServByName (WS2_32.107)
683 HANDLE WINAPI WSAAsyncGetServByName(HWND hWnd, UINT uMsg, LPCSTR name,
684 LPCSTR proto, LPSTR sbuf, INT buflen)
686 TRACE("hwnd %p, msg %04x, name %s, proto %s\n",
687 hWnd, uMsg, (name)?name:"<null>", (proto)?proto:"<null>");
688 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,0,name,0,proto,sbuf,buflen,
689 AQ_GETSERV|AQ_NAME|AQ_DUPLOWPTR1|AQ_DUPLOWPTR2|AQ_WIN32));
692 /***********************************************************************
693 * WSAAsyncGetServByPort (WINSOCK.106)
695 HANDLE16 WINAPI WSAAsyncGetServByPort16(HWND16 hWnd, UINT16 uMsg, INT16 port,
696 LPCSTR proto, SEGPTR sbuf, INT16 buflen)
698 TRACE("hwnd %04x, msg %04x, port %i, proto %s\n",
699 hWnd, uMsg, port, (proto)?proto:"<null>" );
700 return __WSAsyncDBQuery(HWND_32(hWnd),uMsg,port,NULL,0,proto,
702 AQ_GETSERV|AQ_NUMBER|AQ_DUPLOWPTR2|AQ_WIN16);
705 /***********************************************************************
706 * WSAAsyncGetServByPort (WS2_32.106)
708 HANDLE WINAPI WSAAsyncGetServByPort(HWND hWnd, UINT uMsg, INT port,
709 LPCSTR proto, LPSTR sbuf, INT buflen)
711 TRACE("hwnd %p, msg %04x, port %i, proto %s\n",
712 hWnd, uMsg, port, (proto)?proto:"<null>" );
713 return WSA_H32( __WSAsyncDBQuery(hWnd,uMsg,port,NULL,0,proto,sbuf,buflen,
714 AQ_GETSERV|AQ_NUMBER|AQ_DUPLOWPTR2|AQ_WIN32));
717 /***********************************************************************
718 * WSACancelAsyncRequest (WS2_32.108)
720 INT WINAPI WSACancelAsyncRequest(HANDLE hAsyncTaskHandle)
722 FIXME("(%p),stub\n", hAsyncTaskHandle);
726 /***********************************************************************
727 * WSACancelAsyncRequest (WINSOCK.108)
729 INT16 WINAPI WSACancelAsyncRequest16(HANDLE16 hAsyncTaskHandle)
731 return (INT16)WSACancelAsyncRequest(WSA_H32 (hAsyncTaskHandle));
734 /***********************************************************************
735 * WSApSetPostRoutine (WS2_32.24)
737 INT WINAPI WSApSetPostRoutine(LPWPUPOSTMESSAGE lpPostRoutine)
739 FIXME("(%p), stub !\n", lpPostRoutine);