!
! ********************************************************************
! *                                                                  *
! *  Copyright 2001 Compaq Computer Corporation                      *
! *                                                                  *
! *  COMPAQ Registered in U.S. Patent and Trademark Office.          *
! *                                                                  *
! *  Confidential computer software. Valid license from Compaq or    *
! *  authorized sublicensor required for possession, use or copying. *
! *  Consistent with FAR 12.211 and 12.212, Commercial Computer      *
! *  Software, Computer Software Documentation, and Technical Data   *
! *  for Commercial Items are licensed to the U.S. Government under  *
! *  vendor's standard commercial license.                           *
! *                                                                  *
! ********************************************************************
!
!DEC$ IF .NOT. DEFINED (WS2_32_ )
!DEC$ DEFINE WS2_32_ 
!
!
!************This version of ws2_32 contains new items****************** 
! Whether new interfaces for routines in WS2_32.LIB extracted from
! VC++6 header files are included is controlled by a statement with the
! following format towards the end of this file.
! 
!IF .NOT. DEFINED(__DO_NOT_INCLUDE_VC6_ITEMS)
!
!Unless the inclusion is explicitly turned off by defining the
!above symbol, the items will be included. 
!
module ws2_32
use dfwinty
!DEC$OBJCOMMENT LIB:"WS2_32.LIB"
!
!                               *****WINSOCK****
! 
!  * Windows Sockets errors redefined as regular Berkeley error constants.
!  * These are commented out in Windows NT to avoid conflicts with errno.h.
!  * Use the WSA constants instead.
!  
!
!   Socket function prototypes   
interface !lib=ws2_32.lib
integer(4) function  accept (s, addr, addrlen)
!DEC$ ATTRIBUTES DEFAULT :: accept
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_accept@12'  :: accept 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'accept'     :: accept 
!DEC$ ENDIF
integer s 
integer addr
integer   addrlen
end function accept
end interface
interface !lib=ws2_32.lib
integer(4) function   bind (s, addr, namelen) 
!DEC$ ATTRIBUTES DEFAULT :: bind
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_bind@12' :: bind 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'bind'    :: bind 
!DEC$ ENDIF
integer s
integer addr
integer namelen
end function bind
end interface
interface !lib=ws2_32.lib
integer(4) function closesocket (s) 
!DEC$ ATTRIBUTES DEFAULT :: closesocket
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_closesocket@4'  :: closesocket 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'closesocket'    :: closesocket 
!DEC$ ENDIF
integer s
end function closesocket
end interface
interface !lib=ws2_32.lib
integer(4) function   connect (s, name, namelen) 
!DEC$ ATTRIBUTES DEFAULT :: connect
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_connect@12'  :: connect 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'connect'     :: connect 
!DEC$ ENDIF
integer s
integer name
integer namelen                                           
end function connect
end interface
interface !lib=ws2_32.lib
integer(4) function  ioctlsocket (s, cmd, argp) 
!DEC$ ATTRIBUTES DEFAULT :: ioctlsocket
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_ioctlsocket@12'  :: ioctlsocket 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'ioctlsocket'     :: ioctlsocket 
!DEC$ ENDIF
integer s
integer cmd
integer argp
end function ioctlsocket
end interface
interface !lib=ws2_32.lib
integer(4) function getpeername (s, name,  namelen) 
!DEC$ ATTRIBUTES DEFAULT :: getpeername
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getpeername@12'  :: getpeername 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getpeername'     :: getpeername 
!DEC$ ENDIF
integer s 
integer name
integer   namelen
end function getpeername
end interface
interface !lib=ws2_32.lib
integer(4) function getsockname (s, name, namelen) 
!DEC$ ATTRIBUTES DEFAULT :: getsockname
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getsockname@12'  :: getsockname 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getsockname'     :: getsockname 
!DEC$ ENDIF
integer s
integer name
integer  namelen
end function getsockname
end interface
interface !lib=ws2_32.lib
integer(4) function getsockopt (s, level, optname, optval, optlen) 
!DEC$ ATTRIBUTES DEFAULT :: getsockopt
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getsockopt@20'  :: getsockopt 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getsockopt'     :: getsockopt 
!DEC$ ENDIF
integer s
integer level
integer optname
integer optval 
integer optlen
end function getsockopt
end interface
interface !lib=ws2_32.lib
integer(4) function htonl (hostlong) 
!DEC$ ATTRIBUTES DEFAULT :: htonl
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_htonl@4'  :: htonl 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'htonl'    :: htonl 
!DEC$ ENDIF
integer hostlong
end function htonl
end interface
interface !lib=ws2_32.lib
integer(2) function htons (hostshort) 
!DEC$ ATTRIBUTES DEFAULT :: htons
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_htons@4'  :: htons 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'htons'    :: htons 
!DEC$ ENDIF
integer*2 hostshort
end function htons 
end interface
interface !lib=ws2_32.lib
integer(4) function inet_addr ( cp) 
!DEC$ ATTRIBUTES DEFAULT :: inet_addr
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_inet_addr@4'  :: inet_addr 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'inet_addr'    :: inet_addr 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: cp
character*(*)   cp
end function inet_addr 
end interface
interface !lib=ws2_32.lib
integer(4) function inet_ntoa (in)
!DEC$ ATTRIBUTES DEFAULT :: inet_ntoa
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_inet_ntoa@4'  :: inet_ntoa
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'inet_ntoa'    :: inet_ntoa
!DEC$ ENDIF
integer(4)  in
end function inet_ntoa
end interface
interface !lib=ws2_32.lib
integer(4) function listen ( s, backlog) 
!DEC$ ATTRIBUTES DEFAULT :: listen
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_listen@8'  :: listen 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'listen'    :: listen 
!DEC$ ENDIF
integer s
integer backlog
end function listen 
end interface
interface !lib=ws2_32.lib
integer(4) function  ntohl (netlong) 
!DEC$ ATTRIBUTES DEFAULT :: ntohl
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_ntohl@4'  :: ntohl 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'ntohl'    :: ntohl 
!DEC$ ENDIF
integer netlong
end function ntohl 
end interface
interface !lib=ws2_32.lib
integer(2) function  ntohs (netshort) 
!DEC$ ATTRIBUTES DEFAULT :: ntohs
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_ntohs@4'  :: ntohs 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'ntohs'    :: ntohs 
!DEC$ ENDIF
integer*2 netshort
end function ntohs 
end interface
interface !lib=ws2_32.lib
integer(4) function recv (s,  buf, len,  flags) 
!DEC$ ATTRIBUTES DEFAULT :: recv
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_recv@16'  :: recv 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'recv'     :: recv 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         s 
character*(*)   buf
integer         len
integer         flags
end function recv 
end interface
interface !lib=ws2_32.lib
integer(4) function recvfrom (s,  buf, len, flags, from,  fromlen) 
!DEC$ ATTRIBUTES DEFAULT :: recvfrom
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_recvfrom@24'  :: recvfrom 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'recvfrom'     :: recvfrom 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         s 
character*(*)   buf
integer         len
integer         flags
integer         from
integer         fromlen
end function recvfrom 
end interface
interface !lib=ws2_32.lib
integer(4) function select (nfds, readfds, writefds, exceptfds, timeout) 
!DEC$ ATTRIBUTES DEFAULT :: select
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_select@20'  :: select 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'select'     :: select 
!DEC$ ENDIF
integer nfds
integer readfds
integer writefds
integer exceptfds
integer timeout
end function select 
end interface
interface !lib=ws2_32.lib
integer(4) function send (s,  buf,  len,  flags) 
!DEC$ ATTRIBUTES DEFAULT :: send
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_send@16'  :: send 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'send'     :: send 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         s 
character*(*)   buf
integer         len
integer         flags
end function send 
end interface
interface !lib=ws2_32.lib
integer(4) function sendto (s,  buf,  len,  flags, to,  tolen) 
!DEC$ ATTRIBUTES DEFAULT :: sendto
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_sendto@24'  :: sendto 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'sendto'     :: sendto 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         s 
character*(*)   buf
integer         len
integer         flags
integer         to
integer         tolen
end function sendto 
end interface
interface !lib=ws2_32.lib
integer(4) function setsockopt (s, level, optname, optval, optlen) 
!DEC$ ATTRIBUTES DEFAULT :: setsockopt
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_setsockopt@20'  :: setsockopt 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'setsockopt'     :: setsockopt 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: optval
integer         s
integer         level
integer         optname
character*(*)   optval
integer         optlen
end function setsockopt 
end interface
interface !lib=ws2_32.lib
integer(4) function shutdown (s, how) 
!DEC$ ATTRIBUTES DEFAULT :: shutdown
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_shutdown@8'  :: shutdown 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'shutdown'    :: shutdown 
!DEC$ ENDIF
integer s
integer how
end function shutdown 
end interface
interface !lib=ws2_32.lib
integer (4) function socket (af,type, protocol) 
!DEC$ ATTRIBUTES DEFAULT :: socket
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_socket@12'  :: socket 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'socket'     :: socket 
!DEC$ ENDIF
integer af
integer type
integer protocol
end function socket 
end interface
!   Database function prototypes   
interface !lib=ws2_32.lib
integer(4) function gethostbyaddr( addr, len, type)
!DEC$ ATTRIBUTES DEFAULT :: gethostbyaddr
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_gethostbyaddr@12'  :: gethostbyaddr
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'gethostbyaddr'     :: gethostbyaddr
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: addr
character*(*)   addr
integer         len
integer         type
end function gethostbyaddr
end interface
interface !lib=ws2_32.lib
integer(4) function gethostbyname (name) 
!DEC$ ATTRIBUTES DEFAULT :: gethostbyname
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_gethostbyname@4'  :: gethostbyname 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'gethostbyname'    :: gethostbyname 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
character*(*)   name
end function gethostbyname 
end interface
interface !lib=ws2_32.lib
integer(4) function gethostname ( name, namelen) 
!DEC$ ATTRIBUTES DEFAULT :: gethostname
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_gethostname@8'  :: gethostname 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'gethostname'    :: gethostname 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
character*(*)   name
integer         namelen
end function gethostname 
end interface
interface !lib=ws2_32.lib
integer(4) function getservbyport (port, proto) 
!DEC$ ATTRIBUTES DEFAULT :: getservbyport
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getservbyport@8'  :: getservbyport 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getservbyport'    :: getservbyport 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: proto
integer         port
character*(*)   proto
end function getservbyport 
end interface
interface !lib=ws2_32.lib
integer(4) function getservbyname (name, proto) 
!DEC$ ATTRIBUTES DEFAULT :: getservbyname
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getservbyname@8'  :: getservbyname 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getservbyname'    :: getservbyname 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
!DEC$ ATTRIBUTES REFERENCE :: proto
character*(*)   name
character*(*)   proto
end function getservbyname 
end interface
interface !lib=ws2_32.lib
integer(4) function getprotobynumber (proto) 
!DEC$ ATTRIBUTES DEFAULT :: getprotobynumber
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_getprotobynumber@4'  :: getprotobynumber 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'getprotobynumber'    :: getprotobynumber 
!DEC$ ENDIF
integer proto
end function getprotobynumber 
end interface
interface !lib=ws2_32.lib
integer(4) function getprotobyname ( name) 
!DEC$ ATTRIBUTES DEFAULT :: getprotobyname
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS :  '_getprotobyname@4'  :: getprotobyname 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :   'getprotobyname'    :: getprotobyname 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
character*(*)   name
end function getprotobyname 
end interface
!   Microsoft Windows Extension function prototypes   
interface !lib=ws2_32.lib
integer(4) function  WSAStartup (wVersionRequired, lpWSAData) 
!DEC$ ATTRIBUTES DEFAULT :: WSAStartup
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAStartup@8'  :: WSAStartup 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAStartup'    :: WSAStartup 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: lpWSAData
use dfwinty
integer*2           wVersionRequired
type (T_WSADATA)    lpWSAData
end function WSAStartup 
end interface
interface !lib=ws2_32.lib
integer(4) function  WSACleanup () 
!DEC$ ATTRIBUTES DEFAULT :: WSACleanup
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSACleanup@0'  :: WSACleanup 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSACleanup'    :: WSACleanup 
!DEC$ ENDIF
end function WSACleanup 
end interface
interface !lib=ws2_32.lib
subroutine WSASetLastError (iError) 
!DEC$ ATTRIBUTES DEFAULT :: WSASetLastError
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSASetLastError@4'  :: WSASetLastError 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSASetLastError'    :: WSASetLastError 
!DEC$ ENDIF
integer iError
end subroutine WSASetLastError 
end interface
interface !lib=ws2_32.lib
integer(4) function WSAGetLastError () 
!DEC$ ATTRIBUTES DEFAULT :: WSAGetLastError
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAGetLastError@0'  :: WSAGetLastError 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAGetLastError'    :: WSAGetLastError 
!DEC$ ENDIF
end function WSAGetLastError 
end interface
interface !lib=ws2_32.lib
logical(4) function WSAIsBlocking () 
!DEC$ ATTRIBUTES DEFAULT :: WSAIsBlocking
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAIsBlocking@0'  :: WSAIsBlocking 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAIsBlocking'    :: WSAIsBlocking 
!DEC$ ENDIF
end function WSAIsBlocking 
end interface
interface !lib=ws2_32.lib
integer(4) function WSAUnhookBlockingHook () 
!DEC$ ATTRIBUTES DEFAULT :: WSAUnhookBlockingHook
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAUnhookBlockingHook@0'  :: WSAUnhookBlockingHook 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAUnhookBlockingHook'    :: WSAUnhookBlockingHook 
!DEC$ ENDIF
end function WSAUnhookBlockingHook 
end interface
interface !lib=ws2_32.lib
integer(4) function WSASetBlockingHook ( lpBlockFunc) 
!DEC$ ATTRIBUTES DEFAULT :: WSASetBlockingHook
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSASetBlockingHook@4'  :: WSASetBlockingHook 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSASetBlockingHook'    :: WSASetBlockingHook 
!DEC$ ENDIF
integer lpBlockFunc
end function WSASetBlockingHook 
end interface
interface !lib=ws2_32.lib
integer(4) function WSACancelBlockingCall () 
!DEC$ ATTRIBUTES DEFAULT :: WSACancelBlockingCall
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSACancelBlockingCall@0'  :: WSACancelBlockingCall 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSACancelBlockingCall'    :: WSACancelBlockingCall 
!DEC$ ENDIF
end function WSACancelBlockingCall 
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetServByName(hWnd, wMsg, name,  proto,  buf, buflen) result(ret)
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetServByName
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetServByName@24'  :: WSAAsyncGetServByName
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetServByName'     :: WSAAsyncGetServByName
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
!DEC$ ATTRIBUTES REFERENCE :: proto
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
character*(*)   name
character*(*)   proto
character*(*)   buf
integer         buflen
end function WSAAsyncGetServByName
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetServByPort (hWnd, wMsg, port, proto,  buf,buflen) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetServByPort
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetServByPort@24' :: WSAAsyncGetServByPort 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetServByPort'    :: WSAAsyncGetServByPort 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: proto
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
integer         port
character*(*)   proto
character*(*)   buf
integer         buflen
end function WSAAsyncGetServByPort
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetProtoByName (hWnd, wMsg, name, buf,buflen) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetProtoByName
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetProtoByName@20'  :: WSAAsyncGetProtoByName 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetProtoByName'     :: WSAAsyncGetProtoByName 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
character*(*)   name
character*(*)   buf
integer         buflen
end function WSAAsyncGetProtoByName
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetProtoByNumber (hWnd, wMsg, number,  buf, buflen) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetProtoByNumber
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetProtoByNumber@20'  :: WSAAsyncGetProtoByNumber 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetProtoByNumber'     :: WSAAsyncGetProtoByNumber 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
integer         number
character*(*)   buf
integer         buflen
end function WSAAsyncGetProtoByNumber
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetHostByName ( hWnd,  wMsg,  name, buf, buflen) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetHostByName
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetHostByName@20'  :: WSAAsyncGetHostByName 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetHostByName'     :: WSAAsyncGetHostByName 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: name
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
character*(*)   name
character*(*)   buf
integer         buflen
end function WSAAsyncGetHostByName
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncGetHostByAddr (hWnd, wMsg, addr, len, type, buf, buflen) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncGetHostByAddr
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncGetHostByAddr@28'  :: WSAAsyncGetHostByAddr 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncGetHostByAddr'     :: WSAAsyncGetHostByAddr 
!DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: addr
!DEC$ ATTRIBUTES REFERENCE :: buf
integer         hWnd
integer         wMsg
character*(*)   addr
integer         len
integer         type
character*(*)   buf
integer         buflen
end function WSAAsyncGetHostByAddr 
end interface
interface !lib=ws2_32.lib
integer(4) function WSACancelAsyncRequest (hAsyncTaskHandle) 
!DEC$ ATTRIBUTES DEFAULT :: WSACancelAsyncRequest
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSACancelAsyncRequest@4'  :: WSACancelAsyncRequest 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSACancelAsyncRequest'    :: WSACancelAsyncRequest 
!DEC$ ENDIF
integer hAsyncTaskHandle
end function WSACancelAsyncRequest 
end interface
interface !lib=ws2_32.lib
integer(4) function WSAAsyncSelect (s, hWnd, wMsg, lEvent) 
!DEC$ ATTRIBUTES DEFAULT :: WSAAsyncSelect
!DEC$ IF DEFINED(_X86_)
!DEC$ ATTRIBUTES STDCALL, ALIAS : '_WSAAsyncSelect@16'  :: WSAAsyncSelect 
!DEC$ ELSE
!DEC$ ATTRIBUTES STDCALL, ALIAS :  'WSAAsyncSelect'     :: WSAAsyncSelect 
!DEC$ ENDIF
integer s
integer hWnd
integer wMsg
integer lEvent
end function WSAAsyncSelect
end interface
!
!DEC$ IF .NOT. DEFINED(__DO_NOT_INCLUDE_VC6_ITEMS)
!
INTERFACE 
FUNCTION WSAFDIsSet( &
        arg1, &
        arg2)
USE DFWINTY
  integer(SINT) :: WSAFDIsSet ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAFDIsSet
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'___WSAFDIsSet@8' :: WSAFDIsSet
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'__WSAFDIsSet' :: WSAFDIsSet
    !DEC$ ENDIF
  integer(UINT) arg1 ! SOCKET arg1
!DEC$ ATTRIBUTES REFERENCE :: arg2
  TYPE (T_fd_set)  arg2 ! fd_set*  arg2
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAAccept( &
        s, &
        addr, &
        addrlen,    &
        lpfnCondition, &
        dwCallbackData)
USE DFWINTY
  integer(UINT) :: WSAAccept ! SOCKET
    !DEC$ ATTRIBUTES DEFAULT :: WSAAccept
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAAccept@20' :: WSAAccept
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAAccept' :: WSAAccept
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: addr
  type(T_SOCKADDR) addr ! struct sockaddr FAR * addr
!DEC$ ATTRIBUTES REFERENCE :: addrlen
  integer(SINT)  addrlen ! LPINT addrlen 
  integer(LPVOID) lpfnCondition  ! LPCONDITIONPROC lpfnCondition
  integer(DWORD) dwCallbackData
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAConnect( &
        s, &
        name, &
        namelen, &
        lpCallerData, &
        lpCalleeData, &
        lpSQOS, &
        lpGQOS)
USE DFWINTY
  integer(SINT) :: WSAConnect ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAConnect
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAConnect@28' :: WSAConnect
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAConnect' :: WSAConnect
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: name
  TYPE (T_struct_sockaddr)  name ! struct_sockaddr*  name
  integer(SINT) namelen ! int namelen
!DEC$ ATTRIBUTES REFERENCE :: lpCallerData
  TYPE (T_WSABUF) lpCallerData ! LPWSABUF lpCallerData
!DEC$ ATTRIBUTES REFERENCE :: lpCalleeData
  TYPE (T_WSABUF) lpCalleeData ! LPWSABUF lpCalleeData
!DEC$ ATTRIBUTES REFERENCE :: lpSQOS
  TYPE (T_QOS) lpSQOS ! LPQOS lpSQOS
!DEC$ ATTRIBUTES REFERENCE :: lpGQOS
  TYPE (T_QOS) lpGQOS ! LPQOS lpGQOS
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSACreateEvent()
USE DFWINTY
  integer(HANDLE) :: WSACreateEvent ! HANDLE
    !DEC$ ATTRIBUTES DEFAULT :: WSACreateEvent
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSACreateEvent@0' :: WSACreateEvent
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSACreateEvent' :: WSACreateEvent
    !DEC$ ENDIF
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSADuplicateSocket( &
        s, &
        dwProcessId, &
        lpProtocolInfo)
USE DFWINTY
  integer(SINT) :: WSADuplicateSocket ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSADuplicateSocket
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSADuplicateSocketA@12' :: WSADuplicateSocket
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSADuplicateSocketA' :: WSADuplicateSocket
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(DWORD) dwProcessId ! DWORD dwProcessId
!DEC$ ATTRIBUTES REFERENCE :: lpProtocolInfo
  TYPE (T_WSAPROTOCOL_INFOA) lpProtocolInfo ! LPWSAPROTOCOL_INFOA lpProtocolInfo
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAEnumNetworkEvents( &
        s, &
        hEventObject, &
        lpNetworkEvents)
USE DFWINTY
  integer(SINT) :: WSAEnumNetworkEvents ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAEnumNetworkEvents
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAEnumNetworkEvents@12' :: WSAEnumNetworkEvents
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAEnumNetworkEvents' :: WSAEnumNetworkEvents
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(HANDLE) hEventObject ! HANDLE hEventObject
!DEC$ ATTRIBUTES REFERENCE :: lpNetworkEvents
  TYPE (T_WSANETWORKEVENTS) lpNetworkEvents ! LPWSANETWORKEVENTS lpNetworkEvents
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAEnumProtocols( &
        lpiProtocols, &
        lpProtocolBuffer, &
        lpdwBufferLength)
USE DFWINTY
  integer(SINT) :: WSAEnumProtocols ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAEnumProtocols
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAEnumProtocolsA@12' :: WSAEnumProtocols
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAEnumProtocolsA' :: WSAEnumProtocols
    !DEC$ ENDIF
!DEC$ ATTRIBUTES REFERENCE :: lpiProtocols
  integer(SINT) lpiProtocols ! LPINT lpiProtocols
!DEC$ ATTRIBUTES REFERENCE :: lpProtocolBuffer
  TYPE (T_WSAPROTOCOL_INFOA) lpProtocolBuffer ! LPWSAPROTOCOL_INFOA lpProtocolBuffer
!DEC$ ATTRIBUTES REFERENCE :: lpdwBufferLength
  integer(DWORD) lpdwBufferLength ! LPDWORD lpdwBufferLength
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAEventSelect( &
        s, &
        hEventObject, &
        lNetworkEvents)
USE DFWINTY
  integer(SINT) :: WSAEventSelect ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAEventSelect
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAEventSelect@12' :: WSAEventSelect
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAEventSelect' :: WSAEventSelect
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(HANDLE) hEventObject ! HANDLE hEventObject
  integer(LONG) lNetworkEvents ! long lNetworkEvents
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAGetOverlappedResult( &
        s, &
        lpOverlapped, &
        lpcbTransfer, &
        fWait, &
        lpdwFlags)
USE DFWINTY
  integer(BOOL) :: WSAGetOverlappedResult ! BOOL
    !DEC$ ATTRIBUTES DEFAULT :: WSAGetOverlappedResult
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAGetOverlappedResult@20' :: WSAGetOverlappedResult
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAGetOverlappedResult' :: WSAGetOverlappedResult
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED)  lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
!DEC$ ATTRIBUTES REFERENCE :: lpcbTransfer
  integer(DWORD) lpcbTransfer ! LPDWORD lpcbTransfer
  integer(BOOL) fWait ! BOOL fWait
!DEC$ ATTRIBUTES REFERENCE :: lpdwFlags
  integer(DWORD) lpdwFlags ! LPDWORD lpdwFlags
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAGetQOSByName( &
        s, &
        lpQOSName, &
        lpQOS)
USE DFWINTY
  integer(BOOL) :: WSAGetQOSByName ! BOOL
    !DEC$ ATTRIBUTES DEFAULT :: WSAGetQOSByName
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAGetQOSByName@12' :: WSAGetQOSByName
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAGetQOSByName' :: WSAGetQOSByName
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpQOSName
  TYPE (T_WSABUF) lpQOSName ! LPWSABUF lpQOSName
!DEC$ ATTRIBUTES REFERENCE :: lpQOS
  TYPE (T_QOS) lpQOS ! LPQOS lpQOS
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAHtonl( &
        s, &
        hostlong, &
        lpnetlong)
USE DFWINTY
  integer(SINT) :: WSAHtonl ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAHtonl
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAHtonl@12' :: WSAHtonl
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAHtonl' :: WSAHtonl
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(ULONG) hostlong ! u_long hostlong
!DEC$ ATTRIBUTES REFERENCE :: lpnetlong
  integer(ULONG)  lpnetlong ! u_long*  lpnetlong
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAHtons( &
        s, &
        hostshort, &
        lpnetshort)
USE DFWINTY
  integer(SINT) :: WSAHtons ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAHtons
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAHtons@12' :: WSAHtons
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAHtons' :: WSAHtons
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(USHORT) hostshort ! u_short hostshort
!DEC$ ATTRIBUTES REFERENCE :: lpnetshort
  integer(USHORT)  lpnetshort ! u_short*  lpnetshort
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAIoctl( &
        s, &
        dwIoControlCode, &
        lpvInBuffer, &
        cbInBuffer, &
        lpvOutBuffer, &
        cbOutBuffer, &
        lpcbBytesReturned, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSAIoctl ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSAIoctl
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAIoctl@36' :: WSAIoctl
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAIoctl' :: WSAIoctl
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(DWORD) dwIoControlCode ! DWORD dwIoControlCode
  integer(LPVOID) lpvInBuffer ! LPVOID lpvInBuffer
  integer(DWORD) cbInBuffer ! DWORD cbInBuffer
  integer(LPVOID) lpvOutBuffer ! LPVOID lpvOutBuffer
  integer(DWORD) cbOutBuffer ! DWORD cbOutBuffer
!DEC$ ATTRIBUTES REFERENCE :: lpcbBytesReturned
  integer(DWORD) lpcbBytesReturned ! LPDWORD lpcbBytesReturned
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED)  lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine ! LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAJoinLeaf( &
        s, &
        name, &
        namelen, &
        lpCallerData, &
        lpCalleeData, &
        lpSQOS, &
        lpGQOS, &
        dwFlags)
USE DFWINTY
  integer(UINT) :: WSAJoinLeaf ! SOCKET
    !DEC$ ATTRIBUTES DEFAULT :: WSAJoinLeaf
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAJoinLeaf@32' :: WSAJoinLeaf
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAJoinLeaf' :: WSAJoinLeaf
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: name
  TYPE (T_struct_sockaddr)  name ! struct_sockaddr*  name
  integer(SINT) namelen ! int namelen
!DEC$ ATTRIBUTES REFERENCE :: lpCallerData
  TYPE (T_WSABUF) lpCallerData ! LPWSABUF lpCallerData
!DEC$ ATTRIBUTES REFERENCE :: lpCalleeData
  TYPE (T_WSABUF) lpCalleeData ! LPWSABUF lpCalleeData
!DEC$ ATTRIBUTES REFERENCE :: lpSQOS
  TYPE (T_QOS) lpSQOS ! LPQOS lpSQOS
!DEC$ ATTRIBUTES REFERENCE :: lpGQOS
  TYPE (T_QOS) lpGQOS ! LPQOS lpGQOS
  integer(DWORD) dwFlags ! DWORD dwFlags
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSANtohl( &
        s, &
        netlong, &
        lphostlong)
USE DFWINTY
  integer(SINT) :: WSANtohl ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSANtohl
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSANtohl@12' :: WSANtohl
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSANtohl' :: WSANtohl
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(ULONG) netlong ! u_long netlong
!DEC$ ATTRIBUTES REFERENCE :: lphostlong
  integer(ULONG)  lphostlong ! u_long*  lphostlong
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSANtohs( &
        s, &
        netshort, &
        lphostshort)
USE DFWINTY
  integer(SINT) :: WSANtohs ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSANtohs
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSANtohs@12' :: WSANtohs
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSANtohs' :: WSANtohs
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
  integer(USHORT) netshort ! u_short netshort
!DEC$ ATTRIBUTES REFERENCE :: lphostshort
  integer(USHORT)  lphostshort ! u_short*  lphostshort
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSARecv( &
        s, &
        lpBuffers, &
        dwBufferCount, &
        lpNumberOfBytesRecvd, &
        lpFlags, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSARecv ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSARecv
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSARecv@28' :: WSARecv
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSARecv' :: WSARecv
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpBuffers
  TYPE (T_WSABUF) lpBuffers ! LPWSABUF lpBuffers
  integer(DWORD) dwBufferCount ! DWORD dwBufferCount
!DEC$ ATTRIBUTES REFERENCE :: lpNumberOfBytesRecvd
  integer(DWORD) lpNumberOfBytesRecvd ! LPDWORD lpNumberOfBytesRecvd
!DEC$ ATTRIBUTES REFERENCE :: lpFlags
  integer(DWORD) lpFlags ! LPDWORD lpFlags
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED)  lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine ! LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSARecvDisconnect( &
        s, &
        lpInboundDisconnectData)
USE DFWINTY
  integer(SINT) :: WSARecvDisconnect ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSARecvDisconnect
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSARecvDisconnect@8' :: WSARecvDisconnect
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSARecvDisconnect' :: WSARecvDisconnect
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpInboundDisconnectData
  TYPE (T_WSABUF) lpInboundDisconnectData ! LPWSABUF lpInboundDisconnectData
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSARecvFrom( &
        s, &
        lpBuffers, &
        dwBufferCount, &
        lpNumberOfBytesRecvd, &
        lpFlags, &
        lpFrom, &
        lpFromlen, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSARecvFrom ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSARecvFrom
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSARecvFrom@36' :: WSARecvFrom
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSARecvFrom' :: WSARecvFrom
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpBuffers
  TYPE (T_WSABUF) lpBuffers ! LPWSABUF lpBuffers
  integer(DWORD) dwBufferCount ! DWORD dwBufferCount
!DEC$ ATTRIBUTES REFERENCE :: lpNumberOfBytesRecvd
  integer(DWORD) lpNumberOfBytesRecvd ! LPDWORD lpNumberOfBytesRecvd
!DEC$ ATTRIBUTES REFERENCE :: lpFlags
  integer(DWORD) lpFlags ! LPDWORD lpFlags
!DEC$ ATTRIBUTES REFERENCE :: lpFrom
  type(T_SOCKADDR) lpFrom ! struct sockaddr FAR * lpFrom 
!DEC$ ATTRIBUTES REFERENCE :: lpFromlen
  integer(SINT) lpFromlen ! LPINT lpFromlen
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED) lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine 
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASend( &
        s, &
        lpBuffers, &
        dwBufferCount, &
        lpNumberOfBytesSent, &
        dwFlags, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSASend ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSASend
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASend@28' :: WSASend
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASend' :: WSASend
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpBuffers
  TYPE (T_WSABUF) lpBuffers ! LPWSABUF lpBuffers
  integer(DWORD) dwBufferCount ! DWORD dwBufferCount
!DEC$ ATTRIBUTES REFERENCE :: lpNumberOfBytesSent
  integer(DWORD) lpNumberOfBytesSent ! LPDWORD lpNumberOfBytesSent
  integer(DWORD) dwFlags ! DWORD dwFlags
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED)  lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine ! LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASendDisconnect( &
        s, &
        lpOutboundDisconnectData)
USE DFWINTY
  integer(SINT) :: WSASendDisconnect ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSASendDisconnect
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASendDisconnect@8' :: WSASendDisconnect
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASendDisconnect' :: WSASendDisconnect
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpOutboundDisconnectData
  TYPE (T_WSABUF) lpOutboundDisconnectData ! LPWSABUF lpOutboundDisconnectData
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASendTo( &
        s, &
        lpBuffers, &
        dwBufferCount, &
        lpNumberOfBytesSent, &
        dwFlags, &
        lpTo, &
        iTolen, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSASendTo ! int
    !DEC$ ATTRIBUTES DEFAULT :: WSASendTo
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASendTo@36' :: WSASendTo
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASendTo' :: WSASendTo
    !DEC$ ENDIF
  integer(UINT) s ! SOCKET s
!DEC$ ATTRIBUTES REFERENCE :: lpBuffers
  TYPE (T_WSABUF) lpBuffers ! LPWSABUF lpBuffers
  integer(DWORD) dwBufferCount ! DWORD dwBufferCount
!DEC$ ATTRIBUTES REFERENCE :: lpNumberOfBytesSent
  integer(DWORD) lpNumberOfBytesSent ! LPDWORD lpNumberOfBytesSent
  integer(DWORD) dwFlags ! DWORD dwFlags
!DEC$ ATTRIBUTES REFERENCE :: lpTo
  TYPE (T_struct_sockaddr)  lpTo ! struct_sockaddr*  lpTo
  integer(SINT) iTolen ! int iTolen
!DEC$ ATTRIBUTES REFERENCE :: lpOverlapped
  type(T_OVERLAPPED)  lpOverlapped ! LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine ! LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASetEvent( &
        hEvent)
USE DFWINTY
  integer(BOOL) :: WSASetEvent ! BOOL
    !DEC$ ATTRIBUTES DEFAULT :: WSASetEvent
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASetEvent@4' :: WSASetEvent
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASetEvent' :: WSASetEvent
    !DEC$ ENDIF
    integer(HANDLE) hEvent ! HANDLE hEvent
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASocket( &
        af, &
        type, &
        protocol, &
        lpProtocolInfo, &
        g, &
        dwFlags)
USE DFWINTY
  integer(UINT) :: WSASocket ! SOCKET
    !DEC$ ATTRIBUTES DEFAULT :: WSASocket
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASocketA@24' :: WSASocket
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASocketA' :: WSASocket
    !DEC$ ENDIF
  integer(SINT) af ! int af
  integer(SINT) type ! int type
  integer(SINT) protocol ! int protocol
!DEC$ ATTRIBUTES REFERENCE :: lpProtocolInfo
  TYPE (T_WSAPROTOCOL_INFOA) lpProtocolInfo ! LPWSAPROTOCOL_INFOA lpProtocolInfo
  integer(UINT) g ! GROUP g
  integer(DWORD) dwFlags ! DWORD dwFlags
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAWaitForMultipleEvents( &
        cEvents, &
        lphEvents, &
        fWaitAll, &
        dwTimeout, &
        fAlertable)
USE DFWINTY
  integer(DWORD) :: WSAWaitForMultipleEvents ! DWORD
    !DEC$ ATTRIBUTES DEFAULT :: WSAWaitForMultipleEvents
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAWaitForMultipleEvents@20' :: WSAWaitForMultipleEvents
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAWaitForMultipleEvents' :: WSAWaitForMultipleEvents
    !DEC$ ENDIF
  integer(DWORD) cEvents ! DWORD cEvents
!DEC$ ATTRIBUTES REFERENCE :: lphEvents
  integer(HANDLE)  lphEvents ! HANDLE*  lphEvents
  integer(BOOL) fWaitAll ! BOOL fWaitAll
  integer(DWORD) dwTimeout ! DWORD dwTimeout
  integer(BOOL) fAlertable ! BOOL fAlertable
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAAddressToString( &
        lpsaAddress, &
        dwAddressLength, &
        lpProtocolInfo, &
        lpszAddressString, &
        lpdwAddressStringLength)
USE DFWINTY
  integer(SINT) :: WSAAddressToString ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAAddressToString
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAAddressToStringA@20' :: WSAAddressToString
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAAddressToStringA' :: WSAAddressToString
    !DEC$ ENDIF
  integer(LPVOID) lpsaAddress ! IN LPSOCKADDR lpsaAddress
  integer(DWORD) dwAddressLength ! IN DWORD dwAddressLength
  integer(LPVOID) lpProtocolInfo ! IN LPWSAPROTOCOL_INFOA lpProtocolInfo
  integer(LPSTR) lpszAddressString ! IN OUT LPSTR lpszAddressString
  integer(LPDWORD) lpdwAddressStringLength ! IN OUT LPDWORD lpdwAddressStringLength
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAStringToAddress( &
        AddressString, &
        AddressFamily, &
        lpProtocolInfo, &
        lpAddress, &
        lpAddressLength)
USE DFWINTY
  integer(SINT) :: WSAStringToAddress ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAStringToAddress
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAStringToAddressA@20' :: WSAStringToAddress
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAStringToAddressA' :: WSAStringToAddress
    !DEC$ ENDIF
  integer(LPSTR) AddressString ! IN LPSTR AddressString
  integer(SINT) AddressFamily ! IN INT AddressFamily
  integer(LPVOID)lpProtocolInfo ! IN LPWSAPROTOCOL_INFOA lpProtocolInfo
  integer(LPVOID)lpAddress ! IN OUT LPSOCKADDR lpAddress
  integer(LPINT) lpAddressLength ! IN OUT LPINT lpAddressLength
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSALookupServiceBegin( &
        lpqsRestrictions, &
        dwControlFlags, &
        lphLookup)
USE DFWINTY
  integer(SINT) :: WSALookupServiceBegin ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSALookupServiceBegin
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSALookupServiceBeginA@12' :: WSALookupServiceBegin
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSALookupServiceBeginA' :: WSALookupServiceBegin
    !DEC$ ENDIF
   integer(LPVOID)lpqsRestrictions ! IN LPWSAQUERYSETA lpqsRestrictions
   integer(DWORD) dwControlFlags ! IN DWORD dwControlFlags
   integer(LPVOID)lphLookup ! OUT LPHANDLE lphLookup
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSALookupServiceNext( &
        hLookup, &
        dwControlFlags, &
        lpdwBufferLength, &
        lpqsResults)
USE DFWINTY
  integer(SINT) :: WSALookupServiceNext ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSALookupServiceNext
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSALookupServiceNextA@16' :: WSALookupServiceNext
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSALookupServiceNextA' :: WSALookupServiceNext
    !DEC$ ENDIF
   integer(HANDLE) hLookup ! IN HANDLE hLookup
   integer(DWORD) dwControlFlags ! IN DWORD dwControlFlags
   integer(LPDWORD) lpdwBufferLength ! IN OUT LPDWORD lpdwBufferLength
   integer(LPVOID) lpqsResults ! OUT LPWSAQUERYSETA lpqsResults
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSALookupServiceEnd( &
        hLookup)
USE DFWINTY
  integer(SINT) :: WSALookupServiceEnd ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSALookupServiceEnd
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSALookupServiceEnd@4' :: WSALookupServiceEnd
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSALookupServiceEnd' :: WSALookupServiceEnd
    !DEC$ ENDIF
  integer(HANDLE) hLookup ! IN HANDLE hLookup
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAInstallServiceClass( &
        lpServiceClassInfo)
USE DFWINTY
  integer(SINT) :: WSAInstallServiceClass ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAInstallServiceClass
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAInstallServiceClassA@4' :: WSAInstallServiceClass
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAInstallServiceClassA' :: WSAInstallServiceClass
    !DEC$ ENDIF
  integer(LPVOID) lpServiceClassInfo ! IN LPWSASERVICECLASSINFOA lpServiceClassInfo
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSARemoveServiceClass( &
        lpServiceClassId)
USE DFWINTY
  integer(SINT) :: WSARemoveServiceClass ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSARemoveServiceClass
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSARemoveServiceClass@4' :: WSARemoveServiceClass
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSARemoveServiceClass' :: WSARemoveServiceClass
    !DEC$ ENDIF
  integer(LPVOID) lpServiceClassId ! IN LPGUID lpServiceClassId
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAGetServiceClassInfo( &
        lpProviderId, &
        lpServiceClassId, &
        lpdwBufSize, &
        lpServiceClassInfo)
USE DFWINTY
  integer(SINT) :: WSAGetServiceClassInfo ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAGetServiceClassInfo
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAGetServiceClassInfoA@16' :: WSAGetServiceClassInfo
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAGetServiceClassInfoA' :: WSAGetServiceClassInfo
    !DEC$ ENDIF
  integer(LPVOID)lpProviderId ! IN LPGUID lpProviderId
  integer(LPVOID)lpServiceClassId ! IN LPGUID lpServiceClassId
  integer(LPDWORD)lpdwBufSize ! IN OUT LPDWORD lpdwBufSize
  integer(LPVOID)lpServiceClassInfo ! OUT LPWSASERVICECLASSINFOA lpServiceClassInfo
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAEnumNameSpaceProviders( &
        lpdwBufferLength, &
        lpnspBuffer)
USE DFWINTY
  integer(SINT) :: WSAEnumNameSpaceProviders ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAEnumNameSpaceProviders
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAEnumNameSpaceProvidersA@8' :: WSAEnumNameSpaceProviders
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAEnumNameSpaceProvidersA' :: WSAEnumNameSpaceProviders
    !DEC$ ENDIF
  integer(LPDWORD)lpdwBufferLength ! IN OUT LPDWORD lpdwBufferLength
  integer(LPVOID)lpnspBuffer ! IN LPWSANAMESPACE_INFOA lpnspBuffer
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAGetServiceClassNameByClassId( &
        lpServiceClassId, &
        lpszServiceClassName, &
        lpdwBufferLength)
USE DFWINTY
  integer(SINT) :: WSAGetServiceClassNameByClassId ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAGetServiceClassNameByClassId
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAGetServiceClassNameByClassIdA@12' :: WSAGetServiceClassNameByClassId
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAGetServiceClassNameByClassIdA' :: WSAGetServiceClassNameByClassId
    !DEC$ ENDIF
  integer(LPVOID) lpServiceClassId ! IN LPGUID lpServiceClassId
  integer(LPSTR) lpszServiceClassName ! OUT LPSTR lpszServiceClassName
  integer(LPDWORD) lpdwBufferLength ! IN OUT LPDWORD lpdwBufferLength
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSASetService( &
        lpqsRegInfo, &
        essoperation, &
        dwControlFlags)
USE DFWINTY
  integer(SINT) :: WSASetService ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSASetService
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSASetServiceA@12' :: WSASetService
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSASetServiceA' :: WSASetService
    !DEC$ ENDIF
  integer(LPVOID) lpqsRegInfo ! IN LPWSAQUERYSETA lpqsRegInfo
  integer(LPVOID) essoperation ! IN WSAESETSERVICEOP essoperation
   integer(DWORD) dwControlFlags ! IN DWORD dwControlFlags
 END FUNCTION
END INTERFACE
INTERFACE 
FUNCTION WSAProviderConfigChange( &
        lpNotificationHandle, &
        lpOverlapped, &
        lpCompletionRoutine)
USE DFWINTY
  integer(SINT) :: WSAProviderConfigChange ! INT
    !DEC$ ATTRIBUTES DEFAULT :: WSAProviderConfigChange
    !DEC$IF DEFINED(_X86_)
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'_WSAProviderConfigChange@12' :: WSAProviderConfigChange
    !DEC$ ELSE
    !DEC$ ATTRIBUTES STDCALL, ALIAS:'WSAProviderConfigChange' :: WSAProviderConfigChange
    !DEC$ ENDIF
  integer(LPHANDLE) lpNotificationHandle ! IN OUT LPHANDLE lpNotificationHandle
  integer(LPVOID) lpOverlapped ! IN LPWSAOVERLAPPED lpOverlapped
  integer(LPVOID) lpCompletionRoutine ! IN LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine
 END FUNCTION
END INTERFACE
!
!DEC$ ENDIF ! /* __DO_NOT_INCLUDE_VC6_ITEMSW */
!
end module ws2_32
!
!DEC$ ENDIF ! /* WS2_32_ */
