' PBXA64 V23 declarations for ws2_32.pbi
#IF NOT %DEF(PBX_WS2_32_PBI)
#DEFINE PBX_WS2_32_PBI
#INCLUDE ONCE "Legacy/Platform/win_types.inc"
#INCLUDE ONCE "Legacy/Platform/win_consts.inc"

DECLARE FUNCTION WSAStartup LIB "ws2_32.dll" ALIAS "WSAStartup" (BYVAL wVersionRequired AS WORD, BYVAL lpWSAData AS QUAD) AS LONG
DECLARE FUNCTION WSACleanup LIB "ws2_32.dll" ALIAS "WSACleanup" () AS LONG
DECLARE FUNCTION WSAGetLastError LIB "ws2_32.dll" ALIAS "WSAGetLastError" () AS LONG
DECLARE FUNCTION socket LIB "ws2_32.dll" ALIAS "socket" (BYVAL af AS LONG, BYVAL typ AS LONG, BYVAL protocol AS LONG) AS QUAD
DECLARE FUNCTION closesocket LIB "ws2_32.dll" ALIAS "closesocket" (BYVAL s AS QUAD) AS LONG
DECLARE FUNCTION connect LIB "ws2_32.dll" ALIAS "connect" (BYVAL s AS QUAD, BYVAL name AS QUAD, BYVAL namelen AS LONG) AS LONG
DECLARE FUNCTION bind LIB "ws2_32.dll" ALIAS "bind" (BYVAL s AS QUAD, BYVAL name AS QUAD, BYVAL namelen AS LONG) AS LONG
DECLARE FUNCTION listen LIB "ws2_32.dll" ALIAS "listen" (BYVAL s AS QUAD, BYVAL backlog AS LONG) AS LONG
DECLARE FUNCTION accept LIB "ws2_32.dll" ALIAS "accept" (BYVAL s AS QUAD, BYVAL addr AS QUAD, BYVAL addrlen AS QUAD) AS QUAD
DECLARE FUNCTION send LIB "ws2_32.dll" ALIAS "send" (BYVAL s AS QUAD, BYVAL buf AS QUAD, BYVAL length AS LONG, BYVAL flags AS LONG) AS LONG
DECLARE FUNCTION recv LIB "ws2_32.dll" ALIAS "recv" (BYVAL s AS QUAD, BYVAL buf AS QUAD, BYVAL length AS LONG, BYVAL flags AS LONG) AS LONG
DECLARE FUNCTION shutdown LIB "ws2_32.dll" ALIAS "shutdown" (BYVAL s AS QUAD, BYVAL how AS LONG) AS LONG
DECLARE FUNCTION ioctlsocket LIB "ws2_32.dll" ALIAS "ioctlsocket" (BYVAL s AS QUAD, BYVAL cmd AS LONG, BYVAL argp AS QUAD) AS LONG
DECLARE FUNCTION htons LIB "ws2_32.dll" ALIAS "htons" (BYVAL hostshort AS WORD) AS WORD
DECLARE FUNCTION htonl LIB "ws2_32.dll" ALIAS "htonl" (BYVAL hostlong AS DWORD) AS DWORD
DECLARE FUNCTION ntohs LIB "ws2_32.dll" ALIAS "ntohs" (BYVAL netshort AS WORD) AS WORD
DECLARE FUNCTION ntohl LIB "ws2_32.dll" ALIAS "ntohl" (BYVAL netlong AS DWORD) AS DWORD
DECLARE FUNCTION inet_addr LIB "ws2_32.dll" ALIAS "inet_addr" (BYVAL cp AS ASCIIZ PTR) AS DWORD
DECLARE FUNCTION gethostname LIB "ws2_32.dll" ALIAS "gethostname" (BYVAL name AS QUAD, BYVAL namelen AS LONG) AS LONG

#ENDIF
