// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Idwinsock2.pas' rev: 10.00

/*----------------------------------------------------------
NOTE:

using C++Builder 2006 compile 'Idwinsock2.pas' to 'Idwinsock2.hpp',
cannot define struct name:
	WSAPROTOCOLCHAIN
	WSAPROTOCOL_INFOA
	WSAPROTOCOL_INFOW
and other error's, I modify this file.

modify:  yanqing.zhang CHINA
e.Mail:  sczyq@163.com
edited:  2006/01/24
----------------------------------------------------------*/

#ifndef Idwinsock2HPP
#define Idwinsock2HPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Idexception.hpp>	// Pascal unit
#include <Idsys.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Idwinsock2
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS EIdWinsockStubError;
#pragma pack(push,1)
class PASCALIMPLEMENTATION EIdWinsockStubError : public Idexception::EIdException
{
	typedef Idexception::EIdException inherited;

protected:
	unsigned FWin32Error;
	AnsiString FWin32ErrorMessage;
	AnsiString FTitle;

public:
	__fastcall EIdWinsockStubError(const AnsiString ATitle, unsigned AWin32Error);
	__property unsigned Win32Error = {read=FWin32Error, nodefault};
	__property AnsiString Win32ErrorMessage = {read=FWin32ErrorMessage};
	__property AnsiString Title = {read=FTitle};
public:
	#pragma option push -w-inl
	/* EIdException.Create */ inline __fastcall virtual EIdWinsockStubError(AnsiString AMsg)/* overload */ : Idexception::EIdException(AMsg) { }
	#pragma option pop

public:
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EIdWinsockStubError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size) : Idexception::EIdException(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EIdWinsockStubError(int Ident)/* overload */ : Idexception::EIdException(Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EIdWinsockStubError(int Ident, System::TVarRec const * Args, const int Args_Size)/* overload */ : Idexception::EIdException(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EIdWinsockStubError(const AnsiString Msg, int AHelpContext) : Idexception::EIdException(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EIdWinsockStubError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size, int AHelpContext) : Idexception::EIdException(Msg, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EIdWinsockStubError(int Ident, int AHelpContext)/* overload */ : Idexception::EIdException(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EIdWinsockStubError(System::PResStringRec ResStringRec, System::TVarRec const * Args, const int Args_Size, int AHelpContext)/* overload */ : Idexception::EIdException(ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EIdWinsockStubError(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

typedef Byte u_char;

typedef Word u_short;

typedef int u_int;

typedef unsigned u_long;

typedef int TSocket;

typedef unsigned wsaevent;

typedef unsigned *Pwsaevent;

typedef unsigned *LPwsaevent;

typedef char *PMBChar;

struct TFDSet;
typedef TFDSet *PFDSet;

#pragma pack(push,1)
struct TFDSet
{
	
public:
	int fd_count;
	int fd_array[64];
} ;
#pragma pack(pop)

struct TTimeVal;
typedef TTimeVal *PTimeVal;

#pragma pack(push,1)
struct TTimeVal
{
	
public:
	int tv_sec;
	int tv_usec;
} ;
#pragma pack(pop)

struct THostEnt;
typedef THostEnt *PHostEnt;

#pragma pack(push,1)
struct THostEnt
{
	
public:
	char *h_name;
	char * *h_aliases;
	short h_addrtype;
	short h_length;
	union
	{
		struct 
		{
			char * *h_addr;
			
		};
		struct 
		{
			char * *h_address_list;
			
		};
		
	};
} ;
#pragma pack(pop)

struct TNetEnt;
typedef TNetEnt *PNetEnt;

#pragma pack(push,1)
struct TNetEnt
{
	
public:
	char *n_name;
	char * *n_aliases;
	short n_addrtype;
	unsigned n_net;
} ;
#pragma pack(pop)

struct TServEnt;
typedef TServEnt *PServEnt;

#pragma pack(push,1)
struct TServEnt
{
	
public:
	char *s_name;
	char * *s_aliases;
	short s_port;
	char *s_proto;
} ;
#pragma pack(pop)

struct TProtoEnt;
typedef TProtoEnt *PProtoEnt;

#pragma pack(push,1)
struct TProtoEnt
{
	
public:
	char *p_name;
	char * *p_aliases;
	short p_proto;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct SunB
{
	
public:
	Byte s_b1;
	Byte s_b2;
	Byte s_b3;
	Byte s_b4;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct SunW
{
	
public:
	Word s_w1;
	Word s_w2;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct TInAddr
{
	
	union
	{
		struct 
		{
			unsigned S_addr;
			
		};
		struct 
		{
			SunW S_un_w;
			
		};
		struct 
		{
			SunB S_un_b;
			
		};
		
	};
} ;
#pragma pack(pop)

typedef TInAddr *PInAddr;

#pragma pack(push,1)
struct TSockAddrIn
{
	
	union
	{
		struct 
		{
			Word sa_family;
			char sa_data[14];
			
		};
		struct 
		{
			Word sin_family;
			Word sin_port;
			TInAddr sin_addr;
			char sin_zero[8];
			
		};
		
	};
} ;
#pragma pack(pop)

typedef TSockAddrIn *PSockAddrIn;

typedef TSockAddrIn  TSockAddr;

typedef TSockAddrIn *PSOCKADDR;

typedef TSockAddrIn *LPSOCKADDR;

typedef TSockAddrIn  SOCKADDR;

typedef TSockAddrIn  sockaddr_in;

struct TSockProto;
typedef TSockProto *PSockProto;

#pragma pack(push,1)
struct TSockProto
{
	
public:
	Word sp_family;
	Word sp_protocol;
} ;
#pragma pack(pop)

struct TLinger;
typedef TLinger *PLinger;

#pragma pack(push,1)
struct TLinger
{
	
public:
	Word l_onoff;
	Word l_linger;
} ;
#pragma pack(pop)

struct TWSAData;
typedef TWSAData *PWSAData;

#pragma pack(push,1)
struct TWSAData
{
	
public:
	Word wVersion;
	Word wHighVersion;
	char szDescription[257];
	char szSystemStatus[129];
	Word iMaxSockets;
	Word iMaxUdpDg;
	char *lpVendorInfo;
} ;
#pragma pack(pop)

typedef _OVERLAPPED  wsaoverlapped;

typedef _OVERLAPPED  TWSAOverlapped;

typedef _OVERLAPPED *PWSAOverlapped;

typedef _OVERLAPPED *LPwsaoverlapped;

#pragma pack(push,1)
struct WSABUF
{
	
public:
	unsigned len;
	char *buf;
} ;
#pragma pack(pop)

typedef WSABUF  TWSABUF;

typedef WSABUF *PWSABUF;

typedef WSABUF *LPWSABUF;

typedef int TServiceType;

#pragma pack(push,1)
struct TFlowSpec
{
	
public:
	int TokenRate;
	int TokenBucketSize;
	int PeakBandwidth;
	int Latency;
	int DelayVariation;
	int ServiceType;
	int MaxSduSize;
	int MinimumPolicedSize;
} ;
#pragma pack(pop)

typedef TFlowSpec *PFlowSpec;

#pragma pack(push,1)
struct QOS
{
	
public:
	#pragma pack(push,1)
	TFlowSpec SendingFlowspec;
	#pragma pack(pop)
	#pragma pack(push,1)
	TFlowSpec ReceivingFlowspec;
	#pragma pack(pop)
	#pragma pack(push,1)
	WSABUF ProviderSpecific;
	#pragma pack(pop)
} ;
#pragma pack(pop)

typedef QOS  TQualityOfService;

typedef QOS *PQOS;

typedef QOS *LPQOS;

typedef unsigned GROUP;

#pragma pack(push,1)
struct TWSANetworkEvents
{

public:
	int lNetworkEvents;
	int iErrorCode[10];
} ;
#pragma pack(pop)


#pragma pack(push,1)
typedef struct _TRANSMIT_FILE_BUFFERS
{
	void * Head;
	DWORD HeadLength;
	void * Tail;
	DWORD TailLength;
} TRANSMIT_FILE_BUFFERS;
#pragma pack(pop)

typedef TRANSMIT_FILE_BUFFERS TTransmitFileBuffers;
typedef TTransmitFileBuffers * PTransmitFileBuffers;

#define MAX_PROTOCOL_CHAIN 7
#define WSAPROTOCOL_LEN  255

typedef struct _WSAPROTOCOLCHAIN {
    int ChainLen;                                 /* the length of the chain,     */
                                                  /* length = 0 means layered protocol, */
                                                  /* length = 1 means base protocol, */
                                                  /* length > 1 means protocol chain */
	DWORD ChainEntries[MAX_PROTOCOL_CHAIN];       /* a list of dwCatalogEntryIds */
} WSAPROTOCOLCHAIN, FAR * LPWSAPROTOCOLCHAIN;

typedef struct _WSAPROTOCOL_INFOA {
    DWORD dwServiceFlags1;
    DWORD dwServiceFlags2;
    DWORD dwServiceFlags3;
    DWORD dwServiceFlags4;
    DWORD dwProviderFlags;
    GUID ProviderId;
    DWORD dwCatalogEntryId;
	WSAPROTOCOLCHAIN ProtocolChain;
    int iVersion;
    int iAddressFamily;
    int iMaxSockAddr;
    int iMinSockAddr;
    int iSocketType;
    int iProtocol;
    int iProtocolMaxOffset;
    int iNetworkByteOrder;
    int iSecurityScheme;
    DWORD dwMessageSize;
    DWORD dwProviderReserved;
	CHAR   szProtocol[256];
} WSAPROTOCOL_INFOA, FAR * LPWSAPROTOCOL_INFOA;

typedef struct _WSAPROTOCOL_INFOW {
    DWORD dwServiceFlags1;
    DWORD dwServiceFlags2;
    DWORD dwServiceFlags3;
    DWORD dwServiceFlags4;
    DWORD dwProviderFlags;
    GUID ProviderId;
    DWORD dwCatalogEntryId;
    WSAPROTOCOLCHAIN ProtocolChain;
    int iVersion;
    int iAddressFamily;
    int iMaxSockAddr;
    int iMinSockAddr;
    int iSocketType;
    int iProtocol;
    int iProtocolMaxOffset;
    int iNetworkByteOrder;
    int iSecurityScheme;
    DWORD dwMessageSize;
	DWORD dwProviderReserved;
    WCHAR  szProtocol[WSAPROTOCOL_LEN+1];
} WSAPROTOCOL_INFOW, FAR * LPWSAPROTOCOL_INFOW;

typedef TWSANetworkEvents *PWSANetworkEvents;

typedef TWSANetworkEvents *LPWSANetworkEvents;

typedef WSAPROTOCOLCHAIN   TWSAProtocolChain;

typedef WSAPROTOCOL_INFOA  TWSAProtocol_InfoA;

typedef WSAPROTOCOL_INFOA *PWSAProtocol_InfoA;

typedef WSAPROTOCOL_INFOW  TWSAProtocol_InfoW;

typedef WSAPROTOCOL_INFOW *PWSAProtocol_InfoW;

typedef WSAPROTOCOL_INFOA  TWSAProtocol_Info;

typedef WSAPROTOCOL_INFOA *PWSAProtocol_Info;

#pragma pack(push,1)
struct TBLOB
{
	
public:
	unsigned cbSize;
	Byte *pBlobData;
} ;
#pragma pack(pop)

typedef TBLOB *PBLOB;

#pragma pack(push,1)
struct SOCKET_ADDRESS
{
	
public:
	TSockAddrIn *lpSockaddr;
	int iSockaddrLength;
} ;
#pragma pack(pop)

typedef SOCKET_ADDRESS *PSOCKET_ADDRESS;

#pragma pack(push,1)
struct CSADDR_INFO
{
	
public:
	#pragma pack(push,1)
	SOCKET_ADDRESS LocalAddr;
	#pragma pack(pop)
	#pragma pack(push,1)
	SOCKET_ADDRESS RemoteAddr;
	#pragma pack(pop)
	int iSocketType;
	int iProtocol;
} ;
#pragma pack(pop)

typedef CSADDR_INFO *PCSADDR_INFO;

typedef CSADDR_INFO *LPCSADDR_INFO;

#pragma pack(push,1)
struct SOCKET_ADDRESS_LIST
{
	
public:
	int iAddressCount;
	SOCKET_ADDRESS Address[1];
} ;
#pragma pack(pop)

typedef SOCKET_ADDRESS_LIST *lpsocket_ADDRESS_LIST;

#pragma pack(push,1)
struct AFProtocols
{
	
public:
	int iAddressFamily;
	int iProtocol;
} ;
#pragma pack(pop)

typedef AFProtocols  TAFProtocols;

typedef AFProtocols *PAFProtocols;

#pragma option push -b-
enum TWSAEComparator { COMP_EQUAL, COMP_NOTLESS };
#pragma option pop

#pragma pack(push,1)
struct TWSAVersion
{
	
public:
	unsigned dwVersion;
	TWSAEComparator ecHow;
} ;
#pragma pack(pop)

typedef TWSAVersion *PWSAVersion;

#pragma pack(push,1)
struct TWSAQuerySetA
{
	
public:
	unsigned dwSize;
	char *lpszServiceInstanceName;
	GUID *lpServiceClassId;
	TWSAVersion *lpVersion;
	char *lpszComment;
	unsigned dwNameSpace;
	GUID *lpNSProviderId;
	char *lpszContext;
	unsigned dwNumberOfProtocols;
	AFProtocols *lpafpProtocols;
	char *lpszQueryString;
	unsigned dwNumberOfCsAddrs;
	CSADDR_INFO *lpcsaBuffer;
	unsigned dwOutputFlags;
	TBLOB *lpBlob;
} ;
#pragma pack(pop)

typedef TWSAQuerySetA *PWSAQuerySetA;

typedef TWSAQuerySetA *LPWSAQuerySetA;

#pragma pack(push,1)
struct TWSAQuerySetW
{
	
public:
	unsigned dwSize;
	WideChar *lpszServiceInstanceName;
	GUID *lpServiceClassId;
	TWSAVersion *lpVersion;
	WideChar *lpszComment;
	unsigned dwNameSpace;
	GUID *lpNSProviderId;
	WideChar *lpszContext;
	unsigned dwNumberOfProtocols;
	AFProtocols *lpafpProtocols;
	WideChar *lpszQueryString;
	unsigned dwNumberOfCsAddrs;
	CSADDR_INFO *lpcsaBuffer;
	unsigned dwOutputFlags;
	TBLOB *lpBlob;
} ;
#pragma pack(pop)

typedef TWSAQuerySetW *PWSAQuerySetW;

typedef TWSAQuerySetW *LPWSAQuerySetW;

typedef TWSAQuerySetA  TWSAQuerySet;

typedef TWSAQuerySetA *PWSAQuerySet;

typedef TWSAQuerySetA *LPWSAQuerySet;

#pragma option push -b-
enum TWSAeSetServiceOp { RNRSERVICE_REGISTER, RNRSERVICE_DEREGISTER, RNRSERVICE_DELETE };
#pragma option pop

#pragma pack(push,1)
struct TWSANSClassInfoA
{
	
public:
	char *lpszName;
	unsigned dwNameSpace;
	unsigned dwValueType;
	unsigned dwValueSize;
	void *lpValue;
} ;
#pragma pack(pop)

typedef TWSANSClassInfoA *PWSANSClassInfoA;

#pragma pack(push,1)
struct TWSANSClassInfoW
{
	
public:
	WideChar *lpszName;
	unsigned dwNameSpace;
	unsigned dwValueType;
	unsigned dwValueSize;
	void *lpValue;
} ;
#pragma pack(pop)

typedef TWSANSClassInfoW *PWSANSClassInfoW;

typedef TWSANSClassInfoA  WSANSClassInfo;

typedef TWSANSClassInfoA  TWSANSClassInfo;

typedef TWSANSClassInfoA *PWSANSClassInfo;

typedef TWSANSClassInfoA *LPWSANSClassInfo;

#pragma pack(push,1)
struct TWSAServiceClassInfoA
{
	
public:
	GUID *lpServiceClassId;
	char *lpszServiceClassName;
	unsigned dwCount;
	TWSANSClassInfoA *lpClassInfos;
} ;
#pragma pack(pop)

typedef TWSAServiceClassInfoA *PWSAServiceClassInfoA;

typedef TWSAServiceClassInfoA *LPWSAServiceClassInfoA;

#pragma pack(push,1)
struct TWSAServiceClassInfoW
{
	
public:
	GUID *lpServiceClassId;
	WideChar *lpszServiceClassName;
	unsigned dwCount;
	TWSANSClassInfoW *lpClassInfos;
} ;
#pragma pack(pop)

typedef TWSAServiceClassInfoW *PWSAServiceClassInfoW;

typedef TWSAServiceClassInfoW *LPWSAServiceClassInfoW;

typedef TWSAServiceClassInfoA  WSAServiceClassInfo;

typedef TWSAServiceClassInfoA  TWSAServiceClassInfo;

typedef TWSAServiceClassInfoA *PWSAServiceClassInfo;

typedef TWSAServiceClassInfoA *LPWSAServiceClassInfo;

#pragma pack(push,1)
struct TWSANameSpace_InfoA
{
	
public:
	#pragma pack(push,1)
	GUID NSProviderId;
	#pragma pack(pop)
	unsigned dwNameSpace;
	unsigned fActive;
	unsigned dwVersion;
	char *lpszIdentifier;
} ;
#pragma pack(pop)

typedef TWSANameSpace_InfoA *PWSANameSpace_InfoA;

typedef TWSANameSpace_InfoA *LPWSANameSpace_InfoA;

#pragma pack(push,1)
struct TWSANameSpace_InfoW
{
	
public:
	#pragma pack(push,1)
	GUID NSProviderId;
	#pragma pack(pop)
	unsigned dwNameSpace;
	unsigned fActive;
	unsigned dwVersion;
	WideChar *lpszIdentifier;
} ;
#pragma pack(pop)

typedef TWSANameSpace_InfoW *PWSANameSpace_InfoW;

typedef TWSANameSpace_InfoW *LPWSANameSpace_InfoW;

#pragma pack(push,1)
struct _WSAMSG
{
	
public:
	TSockAddrIn *name;
	int namelen;
	WSABUF *lpBuffers;
	unsigned dwBufferCount;
	#pragma pack(push,1)
	WSABUF Control;
	#pragma pack(pop)
	unsigned dwFlags;
} ;
#pragma pack(pop)

typedef _WSAMSG  TWSAMSG;

typedef _WSAMSG *PWSAMSG;

typedef _WSAMSG *LPWSAMSG;

#pragma pack(push,1)
struct _WSACMSGHDR
{
	
public:
	unsigned cmsg_len;
	int cmsg_level;
	int cmsg_type;
} ;
#pragma pack(pop)

typedef _WSACMSGHDR  WSACMSGHDR;

typedef _WSACMSGHDR  TWSACMSGHDR;

typedef _WSACMSGHDR *PWSACMSGHDR;

typedef _WSACMSGHDR *LPWSACMSGHDR;

typedef TWSANameSpace_InfoA  WSANameSpace_Info;

typedef TWSANameSpace_InfoA  TWSANameSpace_Info;

typedef TWSANameSpace_InfoA *PWSANameSpace_Info;

typedef TWSANameSpace_InfoA *LPWSANameSpace_Info;

typedef int __stdcall (*LPCONDITIONPROC)(PWSABUF lpCallerId, PWSABUF lpCallerData, PQOS lpSQOS, PQOS lpGQOS, PWSABUF lpCalleeId, PWSABUF lpCalleeData, unsigned g, unsigned dwCallbackData);

typedef void __stdcall (*LPwsaoverlapped_COMPLETION_ROUTINE)(const unsigned dwError, const unsigned cbTransferred, const void * AOverlapped, const unsigned dwFlags);

typedef int __stdcall (*TWSACleanupProc)(void);

typedef int __stdcall (*TacceptProc)(const int s, PSOCKADDR addr, System::PInteger addrlen);

typedef int __stdcall (*TrecvfromProc)(const int s, void *Buf, int len, int flags, PSOCKADDR from, System::PInteger fromlen);

typedef int __stdcall (*TbindProc)(const int s, const PSOCKADDR name, const int namelen);

typedef int __stdcall (*TclosesocketProc)(const int s);

typedef int __stdcall (*TconnectProc)(const int s, const PSOCKADDR name, const int namelen);

typedef int __stdcall (*TioctlsocketProc)(const int s, const unsigned cmd, unsigned &arg);

typedef int __stdcall (*TgetpeernameProc)(const int s, const PSOCKADDR name, int &namelen);

typedef int __stdcall (*TgetsocknameProc)(const int s, const PSOCKADDR name, int &namelen);

typedef int __stdcall (*TgetsockoptProc)(const int s, const int level, const int optname, char * optval, int &optlen);

typedef unsigned __stdcall (*ThtonlProc)(unsigned hostlong);

typedef Word __stdcall (*ThtonsProc)(Word hostshort);

typedef unsigned __stdcall (*Tinet_addrProc)(char * cp);

typedef char * __stdcall (*Tinet_ntoaProc)(TInAddr inaddr);

typedef int __stdcall (*TlistenProc)(const int s, int backlog);

typedef unsigned __stdcall (*TntohlProc)(unsigned netlong);

typedef Word __stdcall (*TntohsProc)(Word netshort);

typedef int __stdcall (*TrecvProc)(const int s, void *Buf, int len, int flags);

typedef int __stdcall (*TselectProc)(int nfds, PFDSet readfds, PFDSet writefds, PFDSet exceptfds, PTimeVal timeout);

typedef int __stdcall (*TsendProc)(const int s, const void *Buf, int len, int flags);

typedef int __stdcall (*TsendtoProc)(const int s, const void *Buf, const int len, const int flags, const PSOCKADDR addrto, const int tolen);

typedef int __stdcall (*TsetsockoptProc)(const int s, const int level, const int optname, char * optval, const int optlen);

typedef int __stdcall (*TshutdownProc)(const int s, const int how);

typedef int __stdcall (*TsocketProc)(const int af, const int istruct, const int protocol);

typedef PHostEnt __stdcall (*TgethostbyaddrProc)(void * addr, const int len, const int addrtype);

typedef PHostEnt __stdcall (*TgethostbynameProc)(char * name);

typedef int __stdcall (*TgethostnameProc)(char * name, int len);

typedef PServEnt __stdcall (*TgetservbyportProc)(const int port, const char * proto);

typedef PServEnt __stdcall (*TgetservbynameProc)(const char * name, const char * proto);

typedef PProtoEnt __stdcall (*TgetprotobynumberProc)(const int proto);

typedef PProtoEnt __stdcall (*TgetprotobynameProc)(const char * name);

typedef void __stdcall (*TWSASetLastErrorProc)(const int iError);

typedef int __stdcall (*TWSAGetLastErrorProc)(void);

typedef BOOL __stdcall (*TWSAIsBlockingProc)(void);

typedef int __stdcall (*TWSAUnhookBlockingHookProc)(void);

typedef void * __stdcall (*TWSASetBlockingHookProc)(void * lpBlockFunc);

typedef int __stdcall (*TWSACancelBlockingCallProc)(void);

typedef unsigned __stdcall (*TWSAAsyncGetServByNameProc)(HWND HWindow, int wMsg, char * name, char * proto, char * buf, int buflen);

typedef unsigned __stdcall (*TWSAAsyncGetServByPortProc)(HWND HWindow, int wMsg, int port, char * proto, char * buf, int buflen);

typedef unsigned __stdcall (*TWSAAsyncGetProtoByNameProc)(HWND HWindow, int wMsg, char * name, char * buf, int buflen);

typedef unsigned __stdcall (*TWSAAsyncGetProtoByNumberProc)(HWND HWindow, int wMsg, int number, char * buf, int buflen);

typedef unsigned __stdcall (*TWSAAsyncGetHostByNameProc)(HWND HWindow, int wMsg, char * name, char * buf, int buflen);

typedef unsigned __stdcall (*TWSAAsyncGetHostByAddrProc)(HWND HWindow, int wMsg, char * addr, int len, int istruct, char * buf, int buflen);

typedef int __stdcall (*TWSACancelAsyncRequestProc)(unsigned hAsyncTaskHandle);

typedef int __stdcall (*TWSAAsyncSelectProc)(const int s, HWND HWindow, int wMsg, int lEvent);

typedef BOOL __stdcall (*T__WSAFDIsSetProc)(const int s, TFDSet &FDSet);

typedef int __stdcall (*TWSAAcceptProc)(const int s, PSOCKADDR addr, System::PInteger addrlen, LPCONDITIONPROC lpfnCondition, const unsigned dwCallbackData);

typedef int __stdcall (*TWSAEnumProtocolsAProc)(System::PInteger lpiProtocols, PWSAProtocol_InfoA lpProtocolBuffer, unsigned &lpdwBufferLength);

typedef int __stdcall (*TWSAEnumProtocolsWProc)(System::PInteger lpiProtocols, PWSAProtocol_InfoW lpProtocolBuffer, unsigned &lpdwBufferLength);

typedef int __stdcall (*TWSAEnumProtocolsProc)(System::PInteger lpiProtocols, PWSAProtocol_InfoA lpProtocolBuffer, unsigned &lpdwBufferLength);

typedef Word __stdcall (*TWSAGetOverlappedResultProc)(const int s, void * AOverlapped, PDWORD lpcbTransfer, BOOL fWait, unsigned &lpdwFlags);

typedef int __stdcall (*TWSAIoctlProc)(const int s, unsigned dwIoControlCode, void * lpvInBuffer, unsigned cbInBuffer, void * lpvOutBuffer, unsigned cbOutBuffer, PDWORD lpcbBytesReturned, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

typedef int __stdcall (*TWSARecvFromProc)(const int s, PWSABUF lpBuffers, unsigned dwBufferCount, unsigned &lpNumberOfBytesRecvd, unsigned &lpFlags, PSOCKADDR lpFrom, System::PInteger lpFromlen, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

typedef Word __stdcall (*TWSACloseEventProc)(const unsigned hEvent);

typedef int __stdcall (*TWSAConnectProc)(const int s, const PSOCKADDR name, const int namelen, PWSABUF lpCallerData, PWSABUF lpCalleeData, PQOS lpSQOS, PQOS lpGQOS);

typedef unsigned __stdcall (*TWSACreateEventProc)(void);

typedef int __stdcall (*TWSADuplicateSocketAProc)(const int s, const unsigned dwProcessId, PWSAProtocol_InfoA lpProtocolInfo);

typedef int __stdcall (*TWSADuplicateSocketWProc)(const int s, const unsigned dwProcessId, PWSAProtocol_InfoW lpProtocolInfo);

typedef int __stdcall (*TWSADuplicateSocketProc)(const int s, const unsigned dwProcessId, PWSAProtocol_InfoA lpProtocolInfo);

typedef int __stdcall (*TWSAEnumNetworkEventsProc)(const int s, const unsigned hEventObject, PWSANetworkEvents lpNetworkEvents);

typedef int __stdcall (*TWSAEventSelectProc)(const int s, const unsigned hEventObject, int lNetworkEvents);

typedef Word __stdcall (*TWSAGetQOSByNameProc)(const int s, PWSABUF lpQOSName, PQOS lpQOS);

typedef int __stdcall (*TWSAHtonlProc)(const int s, unsigned hostlong, unsigned &lpnetlong);

typedef int __stdcall (*TWSAHtonsProc)(const int s, Word hostshort, Word &lpnetshort);

typedef int __stdcall (*TWSAJoinLeafProc)(const int s, PSOCKADDR name, int namelen, PWSABUF lpCallerData, PWSABUF lpCalleeData, PQOS lpSQOS, PQOS lpGQOS, unsigned dwFlags);

typedef int __stdcall (*TWSANtohlProc)(const int s, unsigned netlong, unsigned &lphostlong);

typedef int __stdcall (*TWSANtohsProc)(const int s, Word netshort, Word &lphostshort);

typedef int __stdcall (*TWSARecvProc)(const int s, PWSABUF lpBuffers, unsigned dwBufferCount, unsigned &lpNumberOfBytesRecvd, unsigned &lpFlags, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

typedef int __stdcall (*TWSARecvDisconnectProc)(const int s, PWSABUF lpInboundDisconnectData);

typedef Word __stdcall (*TWSAResetEventProc)(unsigned hEvent);

typedef int __stdcall (*TWSASendProc)(const int s, PWSABUF lpBuffers, unsigned dwBufferCount, unsigned &lpNumberOfBytesSent, unsigned dwFlags, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

typedef int __stdcall (*TWSASendDisconnectProc)(const int s, PWSABUF lpOutboundDisconnectData);

typedef int __stdcall (*TWSASendToProc)(const int s, PWSABUF lpBuffers, unsigned dwBufferCount, unsigned &lpNumberOfBytesSent, unsigned dwFlags, PSOCKADDR lpTo, int iTolen, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

typedef Word __stdcall (*TWSASetEventProc)(unsigned hEvent);

typedef int __stdcall (*TWSASocketAProc)(int af, int iType, int protocol, PWSAProtocol_InfoA lpProtocolInfo, unsigned g, unsigned dwFlags);

typedef int __stdcall (*TWSASocketWProc)(int af, int iType, int protocol, PWSAProtocol_InfoW lpProtocolInfo, unsigned g, unsigned dwFlags);

typedef int __stdcall (*TWSASocketProc)(int af, int iType, int protocol, PWSAProtocol_InfoA lpProtocolInfo, unsigned g, unsigned dwFlags);

typedef unsigned __stdcall (*TWSAWaitForMultipleEventsProc)(unsigned cEvents, Pwsaevent lphEvents, BOOL fWaitAll, unsigned dwTimeout, BOOL fAlertable);

typedef int __stdcall (*TWSAAddressToStringAProc)(PSOCKADDR lpsaAddress, const unsigned dwAddressLength, const PWSAProtocol_InfoA lpProtocolInfo, const char * lpszAddressString, unsigned &lpdwAddressStringLength);

typedef int __stdcall (*TWSAAddressToStringWProc)(PSOCKADDR lpsaAddress, const unsigned dwAddressLength, const PWSAProtocol_InfoW lpProtocolInfo, const WideChar * lpszAddressString, unsigned &lpdwAddressStringLength);

typedef int __stdcall (*TWSAAddressToStringProc)(PSOCKADDR lpsaAddress, const unsigned dwAddressLength, const PWSAProtocol_InfoA lpProtocolInfo, const char * lpszAddressString, unsigned &lpdwAddressStringLength);

typedef int __stdcall (*TWSAStringToAddressAProc)(const char * AddressString, const int AddressFamily, const PWSAProtocol_InfoA lpProtocolInfo, TSockAddrIn &lpAddress, int &lpAddressLength);

typedef int __stdcall (*TWSAStringToAddressWProc)(const WideChar * AddressString, const int AddressFamily, const PWSAProtocol_InfoW lpProtocolInfo, TSockAddrIn &lpAddress, int &lpAddressLength);

typedef int __stdcall (*TWSAStringToAddressProc)(const char * AddressString, const int AddressFamily, const PWSAProtocol_InfoA lpProtocolInfo, TSockAddrIn &lpAddress, int &lpAddressLength);

typedef int __stdcall (*TWSALookupServiceBeginAProc)(TWSAQuerySetA &qsRestrictions, const unsigned dwControlFlags, unsigned &hLookup);

typedef int __stdcall (*TWSALookupServiceBeginWProc)(TWSAQuerySetW &qsRestrictions, const unsigned dwControlFlags, unsigned &hLookup);

typedef int __stdcall (*TWSALookupServiceBeginProc)(TWSAQuerySetA &qsRestrictions, const unsigned dwControlFlags, unsigned &hLookup);

typedef int __stdcall (*TWSALookupServiceNextAProc)(const unsigned hLookup, const unsigned dwControlFlags, unsigned &dwBufferLength, PWSAQuerySetA lpqsResults);

typedef int __stdcall (*TWSALookupServiceNextWProc)(const unsigned hLookup, const unsigned dwControlFlags, unsigned &dwBufferLength, PWSAQuerySetW lpqsResults);

typedef int __stdcall (*TWSALookupServiceNextProc)(const unsigned hLookup, const unsigned dwControlFlags, unsigned &dwBufferLength, PWSAQuerySetA lpqsResults);

typedef int __stdcall (*TWSALookupServiceEndProc)(const unsigned hLookup);

typedef int __stdcall (*TWSAInstallServiceClassAProc)(const PWSAServiceClassInfoA lpServiceClassInfo);

typedef int __stdcall (*TWSAInstallServiceClassWProc)(const PWSAServiceClassInfoW lpServiceClassInfo);

typedef int __stdcall (*TWSAInstallServiceClassProc)(const PWSAServiceClassInfoA lpServiceClassInfo);

typedef int __stdcall (*TWSARemoveServiceClassProc)(const PGUID lpServiceClassId);

typedef int __stdcall (*TWSAGetServiceClassInfoAProc)(const PGUID lpProviderId, const PGUID lpServiceClassId, unsigned &lpdwBufSize, PWSAServiceClassInfoA lpServiceClassInfo);

typedef int __stdcall (*TWSAGetServiceClassInfoWProc)(const PGUID lpProviderId, const PGUID lpServiceClassId, unsigned &lpdwBufSize, PWSAServiceClassInfoW lpServiceClassInfo);

typedef int __stdcall (*TWSAGetServiceClassInfoProc)(const PGUID lpProviderId, const PGUID lpServiceClassId, unsigned &lpdwBufSize, PWSAServiceClassInfoA lpServiceClassInfo);

typedef int __stdcall (*TWSAEnumNameSpaceProvidersAProc)(unsigned &lpdwBufferLength, const PWSANameSpace_InfoA lpnspBuffer);

typedef int __stdcall (*TWSAEnumNameSpaceProvidersWProc)(unsigned &lpdwBufferLength, const PWSANameSpace_InfoW lpnspBuffer);

typedef int __stdcall (*TWSAEnumNameSpaceProvidersProc)(unsigned &lpdwBufferLength, const PWSANameSpace_InfoA lpnspBuffer);

typedef int __stdcall (*TWSAGetServiceClassNameByClassIdAProc)(const PGUID lpServiceClassId, char * lpszServiceClassName, unsigned &lpdwBufferLength);

typedef int __stdcall (*TWSAGetServiceClassNameByClassIdWProc)(const PGUID lpServiceClassId, WideChar * lpszServiceClassName, unsigned &lpdwBufferLength);

typedef int __stdcall (*TWSAGetServiceClassNameByClassIdProc)(const PGUID lpServiceClassId, char * lpszServiceClassName, unsigned &lpdwBufferLength);

typedef int __stdcall (*TWSASetServiceAProc)(const PWSAQuerySetA lpqsRegInfo, const TWSAeSetServiceOp essoperation, const unsigned dwControlFlags);

typedef int __stdcall (*TWSASetServiceWProc)(const PWSAQuerySetW lpqsRegInfo, const TWSAeSetServiceOp essoperation, const unsigned dwControlFlags);

typedef int __stdcall (*TWSASetServiceProc)(const PWSAQuerySetA lpqsRegInfo, const TWSAeSetServiceOp essoperation, const unsigned dwControlFlags);

typedef int __stdcall (*TWSAProviderConfigChangeProc)(unsigned &lpNotificationHandle, void * AOverlapped, LPwsaoverlapped_COMPLETION_ROUTINE lpCompletionRoutine);

#pragma pack(push,1)
struct ip_mreq
{
	
public:
	#pragma pack(push,1)
	TInAddr imr_multiaddr;
	#pragma pack(pop)
	#pragma pack(push,1)
	TInAddr imr_interface;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct IN_ADDR6
{
	
public:
	Byte s6_addr[16];
} ;
#pragma pack(pop)

typedef IN_ADDR6  TIn6Addr;

typedef IN_ADDR6 *PIn6Addr;

typedef IN_ADDR6  IN6_ADDR;

typedef IN_ADDR6 *PIN6_ADDR;

typedef IN_ADDR6 *LPIN6_ADDR;

#pragma pack(push,1)
struct SOCKADDR_IN6_OLD
{
	
public:
	short sin6_family;
	Word sin6_port;
	unsigned sin6_flowinfo;
	#pragma pack(push,1)
	IN_ADDR6 sin6_addr;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct SOCKADDR_IN6
{
	
public:
	short sin6_family;
	Word sin6_port;
	unsigned sin6_flowinfo;
	#pragma pack(push,1)
	IN_ADDR6 sin6_addr;
	#pragma pack(pop)
	unsigned sin6_scope_id;
} ;
#pragma pack(pop)

typedef SOCKADDR_IN6  TSockAddrIn6;

typedef SOCKADDR_IN6 *PSockAddrIn6;

typedef SOCKADDR_IN6 *PSOCKADDR_IN6;

typedef SOCKADDR_IN6 *LPSOCKADDR_IN6;

#pragma pack(push,1)
struct sockaddr_storage
{
	
public:
	Word ss_family;
	Byte __ss_pad1[6];
	__int64 __ss_align;
	Byte __ss_pad2[112];
} ;
#pragma pack(pop)

typedef sockaddr_storage  Tsockaddr_storage;

typedef sockaddr_storage *Psockaddr_storage;

typedef sockaddr_storage *LPWsockaddr_storage;

#pragma pack(push,1)
struct sockaddr_gen
{
	
	union
	{
		struct 
		{
			SOCKADDR_IN6_OLD AddressIn6;
			
		};
		struct 
		{
			TSockAddrIn AddressIn;
			
		};
		struct 
		{
			TSockAddrIn Address;
			
		};
		
	};
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ipv6_mreq
{
	
public:
	#pragma pack(push,1)
	IN_ADDR6 ipv6mr_multiaddr;
	#pragma pack(pop)
	unsigned ipv6mr_interface;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct INTERFACE_INFO
{
	
public:
	unsigned iiFlags;
	#pragma pack(push,1)
	sockaddr_gen iiAddress;
	#pragma pack(pop)
	#pragma pack(push,1)
	sockaddr_gen iiBroadcastAddress;
	#pragma pack(pop)
	#pragma pack(push,1)
	sockaddr_gen iiNetmask;
	#pragma pack(pop)
} ;
#pragma pack(pop)

typedef INTERFACE_INFO  TINTERFACE_INFO;

typedef INTERFACE_INFO *LPINTERFACE_INFO;

#pragma pack(push,1)
struct INTERFACE_INFO_EX
{
	
public:
	unsigned iiFlags;
	#pragma pack(push,1)
	SOCKET_ADDRESS iiAddress;
	#pragma pack(pop)
	#pragma pack(push,1)
	SOCKET_ADDRESS iiBroadcastAddress;
	#pragma pack(pop)
	#pragma pack(push,1)
	SOCKET_ADDRESS iiNetmask;
	#pragma pack(pop)
} ;
#pragma pack(pop)

typedef INTERFACE_INFO_EX  TINTERFACE_INFO_EX;

typedef INTERFACE_INFO_EX *LPINTERFACE_INFO_EX;

typedef unsigned uint32_t;

typedef Word uint16_t;

typedef Byte uint8_t;

#pragma pack(push,1)
struct ip6_hbh
{
	
public:
	Byte ip6h_nxt;
	Byte ip6h_len;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_dest
{
	
public:
	Byte ip6d_nxt;
	Byte ip6d_len;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_rthdr
{
	
public:
	Byte ip6r_nxt;
	Byte ip6r_len;
	Byte ip6r_type;
	Byte ip6r_segleft;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_rthdr0
{
	
public:
	Byte ip6r0_nxt;
	Byte ip6r0_len;
	Byte ip6r0_type;
	Byte ip6r0_segleft;
	unsigned ip6r0_reserved;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_frag
{
	
public:
	Byte ip6f_nxt;
	Byte ip6f_reserved;
	Word ip6f_offlg;
	unsigned ip6f_ident;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_opt
{
	
public:
	Byte ip6o_type;
	Byte ip6o_len;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_opt_jumbo
{
	
public:
	Byte ip6oj_type;
	Byte ip6oj_len;
	Byte ip6oj_jumbo_len[4];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_opt_nsap
{
	
public:
	Byte ip6on_type;
	Byte ip6on_len;
	Byte ip6on_src_nsap_len;
	Byte ip6on_dst_nsap_len;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_opt_tunnel
{
	
public:
	Byte ip6ot_type;
	Byte ip6ot_len;
	Byte ip6ot_encap_limit;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_opt_router
{
	
public:
	Byte ip6or_type;
	Byte ip6or_len;
	Byte ip6or_value[2];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_hdrctl
{
	
public:
	unsigned ip6_un1_flow;
	Word ip6_un1_plen;
	Byte ip6_un1_nxt;
	Byte ip6_un1_hlim;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ip6_hdr
{
	
	union
	{
		struct 
		{
			Byte ip6_un2_vfc;
			
		};
		struct 
		{
			ip6_hdrctl ip6_un1;
			IN_ADDR6 ip6_src;
			IN_ADDR6 ip6_dst;
			
		};
		
	};
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct icmp6_hdr
{
	
public:
	Byte icmp6_type;
	Byte icmp6_code;
	Word icmp6_cksum;
	union
	{
		struct 
		{
			Byte icmp6_un_data8[4];
			
		};
		struct 
		{
			Word icmp6_un_data16[2];
			
		};
		struct 
		{
			unsigned icmp6_un_data32;
			
		};
		
	};
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_router_solicit
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr nd_rs_hdr;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_router_advert
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr nd_ra_hdr;
	#pragma pack(pop)
	unsigned nd_ra_reachable;
	unsigned nd_ra_retransmit;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_neighbor_solicit
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr nd_ns_hdr;
	#pragma pack(pop)
	#pragma pack(push,1)
	IN_ADDR6 nd_ns_target;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_neighbor_advert
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr nd_na_hdr;
	#pragma pack(pop)
	#pragma pack(push,1)
	IN_ADDR6 nd_na_target;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct nd_opt_prefix_info
{
	
public:
	Byte nd_opt_pi_type;
	Byte nd_opt_pi_len;
	Byte nd_opt_pi_prefix_len;
	Byte nd_opt_pi_flags_reserved;
	unsigned nd_opt_pi_valid_time;
	unsigned nd_opt_pi_preferred_time;
	unsigned nd_opt_pi_reserved2;
	#pragma pack(push,1)
	IN_ADDR6 nd_opt_pi_prefix;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct nd_opt_rd_hdr
{
	
public:
	Byte nd_opt_rh_type;
	Byte nd_opt_rh_len;
	Word nd_opt_rh_reserved1;
	unsigned nd_opt_rh_reserved2;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_opt_mtu
{
	
public:
	Byte nd_opt_mtu_type;
	Byte nd_opt_mtu_len;
	Word nd_opt_mtu_reserved;
	unsigned nd_opt_mtu_mtu;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct mld_hdr
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr mld_icmp6_hdr;
	#pragma pack(pop)
	#pragma pack(push,1)
	IN_ADDR6 mld_addr;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct Tnd_redirect
{
	
public:
	#pragma pack(push,1)
	icmp6_hdr nd_rd_hdr;
	#pragma pack(pop)
	#pragma pack(push,1)
	IN_ADDR6 nd_rd_target;
	#pragma pack(pop)
	#pragma pack(push,1)
	IN_ADDR6 nd_rd_dst;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct nd_opt_hdr
{
	
public:
	Byte nd_opt_type;
	Byte nd_opt_len;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct in_pktinfo
{
	
public:
	#pragma pack(push,1)
	TInAddr ipi_addr;
	#pragma pack(pop)
	unsigned ipi_ifindex;
} ;
#pragma pack(pop)

typedef in_pktinfo *Pin_pktinfo;

typedef in_pktinfo  Tin_pktinfo;

#pragma pack(push,1)
struct in6_pktinfo
{
	
public:
	#pragma pack(push,1)
	IN_ADDR6 ipi6_addr;
	#pragma pack(pop)
	unsigned ipi6_ifindex;
} ;
#pragma pack(pop)

typedef in6_pktinfo *Pin6_pktinfo;

typedef in6_pktinfo  Tin6_pktinfo;

#pragma pack(push,1)
struct SOCKADDR_IPX
{
	
public:
	Word sa_family;
	char sa_netnum[4];
	char sa_nodenum[6];
	Word sa_socket;
} ;
#pragma pack(pop)

typedef SOCKADDR_IPX  TSOCKADDR_IPX;

typedef SOCKADDR_IPX  TSockAddrIPX;

typedef SOCKADDR_IPX *PSOCKADDR_IPX;

typedef SOCKADDR_IPX *PSockAddrIPX;

typedef SOCKADDR_IPX *LPSOCKADDR_IPX;

#pragma pack(push,1)
struct IPX_ADDRESS_DATA
{
	
public:
	int adapternum;
	Byte netnum[4];
	Byte nodenum[6];
	bool wan;
	bool status;
	int maxpkt;
	unsigned linkspeed;
} ;
#pragma pack(pop)

typedef IPX_ADDRESS_DATA *PIPX_ADDRESS_DATA;

#pragma pack(push,1)
struct IPX_NETNUM_DATA
{
	
public:
	Byte netnum[4];
	Word hopcount;
	Word netdelay;
	int cardnum;
	Byte router[6];
} ;
#pragma pack(pop)

typedef IPX_NETNUM_DATA *PIPX_NETNUM_DATA;

#pragma pack(push,1)
struct IPX_SPXCONNSTATUS_DATA
{
	
public:
	Byte ConnectionState;
	Byte WatchDogActive;
	Word LocalConnectionId;
	Word RemoteConnectionId;
	Word LocalSequenceNumber;
	Word LocalAckNumber;
	Word LocalAllocNumber;
	Word RemoteAckNumber;
	Word RemoteAllocNumber;
	Word LocalSocket;
	Byte ImmediateAddress[6];
	Byte RemoteNetwork[4];
	Byte RemoteNode[6];
	Word RemoteSocket;
	Word RetransmissionCount;
	Word EstimatedRoundTripDelay;
	Word RetransmittedPackets;
	Word SuppressedPacket;
} ;
#pragma pack(pop)

typedef IPX_SPXCONNSTATUS_DATA *PIPX_SPXCONNSTATUS_DATA;

#pragma pack(push,1)
struct SOCKADDR_NB
{
	
public:
	short snb_family;
	Word snb_type;
	char snb_name[16];
} ;
#pragma pack(pop)

typedef SOCKADDR_NB  TSockAddrNB;

typedef SOCKADDR_NB *PSockAddrNB;

typedef SOCKADDR_NB *LPSOCKADDR_NB;

#pragma pack(push,1)
struct ATM_ADDRESS
{
	
public:
	unsigned AddressType;
	unsigned NumofDigits;
	Byte Addr[20];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_BLLI
{
	
public:
	unsigned Layer2Protocol;
	unsigned Layer2UserSpecifiedProtocol;
	unsigned Layer3Protocol;
	unsigned Layer3UserSpecifiedProtocol;
	unsigned Layer3IPI;
	Byte SnapID[5];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_BHLI
{
	
public:
	unsigned HighLayerInfoType;
	unsigned HighLayerInfoLength;
	Byte HighLayerInfo[8];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct sockaddr_atm
{
	
public:
	Word satm_family;
	#pragma pack(push,1)
	ATM_ADDRESS satm_number;
	#pragma pack(pop)
	#pragma pack(push,1)
	ATM_BLLI satm_blli;
	#pragma pack(pop)
	#pragma pack(push,1)
	ATM_BHLI satm_bhli;
	#pragma pack(pop)
} ;
#pragma pack(pop)

typedef sockaddr_atm  TSockAddrATM;

typedef sockaddr_atm *PSockAddrATM;

typedef sockaddr_atm *LPSockAddrATM;

typedef sockaddr_atm *PSOCKADDR_ATM;

typedef sockaddr_atm *LPSOCKADDR_ATM;

#pragma option push -b-
enum Q2931_IE_TYPE { IE_AALParameters, IE_TrafficDescriptor, IE_BroadbandBearerCapability, IE_BHLI, IE_BLLI, IE_CalledPartyNumber, IE_CalledPartySubaddress, IE_CallingPartyNumber, IE_CallingPartySubaddress, IE_Cause, IE_QOSClass, IE_TransitNetworkSelection };
#pragma option pop

#pragma pack(push,1)
struct Q2931_IE
{
	
public:
	Q2931_IE_TYPE IEType;
	unsigned IELength;
	Byte IE[1];
} ;
#pragma pack(pop)

typedef int AAL_TYPE;

#pragma pack(push,1)
struct AAL5_PARAMETERS
{
	
public:
	unsigned ForwardMaxCPCSSDUSize;
	unsigned BackwardMaxCPCSSDUSize;
	Byte Mode;
	Byte SSCSType;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct AALUSER_PARAMETERS
{
	
public:
	unsigned UserDefined;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct IdWinSock2__2
{
	
	union
	{
		struct 
		{
			AALUSER_PARAMETERS AALUserParameters;
			
		};
		struct 
		{
			AAL5_PARAMETERS AAL5Parameters;
			
		};
		
	};
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct AAL_PARAMETERS_IE
{
	
public:
	int AALType;
	#pragma pack(push,1)
	IdWinSock2__2 AALSpecificParameters;
	#pragma pack(pop)
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_TD
{
	
public:
	unsigned PeakCellRate_CLP0;
	unsigned PeakCellRate_CLP01;
	unsigned SustainableCellRate_CLP0;
	unsigned SustainableCellRate_CLP01;
	unsigned MaxBurstSize_CLP0;
	unsigned MaxBurstSize_CLP01;
	BOOL Tagging;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_TRAFFIC_DESCRIPTOR_IE
{
	
public:
	#pragma pack(push,1)
	ATM_TD Forward;
	#pragma pack(pop)
	#pragma pack(push,1)
	ATM_TD Backward;
	#pragma pack(pop)
	BOOL BestEffort;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_BROADBAND_BEARER_CAPABILITY_IE
{
	
public:
	Byte BearerClass;
	Byte TrafficType;
	Byte TimingRequirements;
	Byte ClippingSusceptability;
	Byte UserPlaneConnectionConfig;
} ;
#pragma pack(pop)

typedef ATM_BHLI  ATM_BHLI_IE;

#pragma pack(push,1)
struct ATM_BLLI_IE
{
	
public:
	unsigned Layer2Protocol;
	Byte Layer2Mode;
	Byte Layer2WindowSize;
	unsigned Layer2UserSpecifiedProtocol;
	unsigned Layer3Protocol;
	Byte Layer3Mode;
	Byte Layer3DefaultPacketSize;
	Byte Layer3PacketWindowSize;
	unsigned Layer3UserSpecifiedProtocol;
	unsigned Layer3IPI;
	Byte SnapID[5];
} ;
#pragma pack(pop)

typedef ATM_ADDRESS  ATM_CALLED_PARTY_NUMBER_IE;

typedef ATM_ADDRESS  ATM_CALLED_PARTY_SUBADDRESS_IE;

#pragma pack(push,1)
struct ATM_CALLING_PARTY_NUMBER_IE
{
	
public:
	#pragma pack(push,1)
	ATM_ADDRESS ATM_Number;
	#pragma pack(pop)
	Byte Presentation_Indication;
	Byte Screening_Indicator;
} ;
#pragma pack(pop)

typedef ATM_ADDRESS  ATM_CALLING_PARTY_SUBADDRESS_IE;

#pragma pack(push,1)
struct ATM_CAUSE_IE
{
	
public:
	Byte Location;
	Byte Cause;
	Byte DiagnosticsLength;
	Byte Diagnostics[4];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_QOS_CLASS_IE
{
	
public:
	Byte QOSClassForward;
	Byte QOSClassBackward;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_TRANSIT_NETWORK_SELECTION_IE
{
	
public:
	Byte TypeOfNetworkId;
	Byte NetworkIdPlan;
	Byte NetworkIdLength;
	Byte NetworkId[1];
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_CONNECTION_ID
{
	
public:
	unsigned DeviceNumber;
	unsigned VPI;
	unsigned VCI;
} ;
#pragma pack(pop)

#pragma pack(push,1)
struct ATM_PVC_PARAMS
{
	
public:
	#pragma pack(push,1)
	ATM_CONNECTION_ID PvcConnectionId;
	#pragma pack(pop)
	#pragma pack(push,1)
	QOS PvcQos;
	#pragma pack(pop)
} ;
#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
static const Word winsock_version = 0x202;
#define winsock2_dll "WS2_32.DLL"
static const Shortint fd_setsize = 0x40;
static const Shortint iocparm_mask = 0x7f;
static const int ioc_void = 0x20000000;
static const int ioc_out = 0x40000000;
static const unsigned ioc_in = 0x80000000;
static const unsigned ioc_inout = 0xc0000000;
static const int fionread = 0x4004667f;
static const unsigned fionbio = 0x8004667e;
static const unsigned fioasync = 0x8004667d;
static const unsigned siocshiwat = 0x80047300;
static const int siocghiwat = 0x40047301;
static const unsigned siocslowat = 0x80047302;
static const int siocglowat = 0x40047303;
static const int siocatmark = 0x40047307;
static const Shortint ipproto_ip = 0x0;
static const Shortint ipproto_hopopts = 0x0;
static const Shortint ipproto_icmp = 0x1;
static const Shortint ipproto_igmp = 0x2;
static const Shortint ipproto_ggp = 0x3;
static const Shortint ipproto_tcp = 0x6;
static const Shortint ipproto_pup = 0xc;
static const Shortint ipproto_udp = 0x11;
static const Shortint ipproto_idp = 0x16;
static const Shortint ipproto_ipv6 = 0x29;
static const Shortint ipproto_routing = 0x2b;
static const Shortint ipproto_fragment = 0x2c;
static const Shortint ipproto_esp = 0x32;
static const Shortint ipproto_ah = 0x33;
static const Shortint ipproto_icmpv6 = 0x3a;
static const Shortint ipproto_none = 0x3b;
static const Shortint ipproto_dstopts = 0x3c;
static const Shortint ipproto_nd = 0x4d;
static const Shortint ipproto_iclfxbm = 0x4e;
static const Byte ipproto_raw = 0xff;
static const Word ipproto_max = 0x100;
static const Shortint ipport_echo = 0x7;
static const Shortint ipport_discard = 0x9;
static const Shortint ipport_systat = 0xb;
static const Shortint ipport_daytime = 0xd;
static const Shortint ipport_netstat = 0xf;
static const Shortint ipport_ftp = 0x15;
static const Shortint ipport_telnet = 0x17;
static const Shortint ipport_smtp = 0x19;
static const Shortint ipport_timeserver = 0x25;
static const Shortint ipport_nameserver = 0x2a;
static const Shortint ipport_whois = 0x2b;
static const Shortint ipport_mtp = 0x39;
static const Shortint ipport_tftp = 0x45;
static const Shortint ipport_rje = 0x4d;
static const Shortint ipport_finger = 0x4f;
static const Shortint ipport_ttylink = 0x57;
static const Shortint ipport_supdup = 0x5f;
static const Word ipport_execserver = 0x200;
static const Word ipport_loginserver = 0x201;
static const Word ipport_cmdserver = 0x202;
static const Word ipport_efsserver = 0x208;
static const Word ipport_biffudp = 0x200;
static const Word ipport_whoserver = 0x201;
static const Word ipport_routeserver = 0x208;
static const Word ipport_reserved = 0x400;
static const Byte implink_ip = 0x9b;
static const Byte implink_lowexper = 0x9c;
static const Byte implink_highexper = 0x9e;
static const Shortint tf_disconnect = 0x1;
static const Shortint tf_reuse_socket = 0x2;
static const Shortint tf_write_behind = 0x4;
static const Shortint tf_use_default_worker = 0x0;
static const Shortint tf_use_system_thread = 0x10;
static const Shortint tf_use_kernel_apc = 0x20;
static const int invalid_socket = -1;
static const Shortint socket_error = -1;
static const Shortint from_protocol_info = -1;
static const Shortint sock_stream = 0x1;
static const Shortint sock_dgram = 0x2;
static const Shortint sock_raw = 0x3;
static const Shortint sock_rdm = 0x4;
static const Shortint sock_seqpacket = 0x5;
static const Shortint so_debug = 0x1;
static const Shortint so_acceptconn = 0x2;
static const Shortint so_reuseaddr = 0x4;
static const Shortint so_keepalive = 0x8;
static const Shortint so_dontroute = 0x10;
static const Shortint so_broadcast = 0x20;
static const Shortint so_useloopback = 0x40;
static const Byte so_linger = 0x80;
static const Word so_oobinline = 0x100;
static const short so_dontlinger = -129;
static const Shortint so_exclusiveaddruse = -5;
static const Word so_sndbuf = 0x1001;
static const Word so_rcvbuf = 0x1002;
static const Word so_sndlowat = 0x1003;
static const Word so_rcvlowat = 0x1004;
static const Word so_sndtimeo = 0x1005;
static const Word so_rcvtimeo = 0x1006;
static const Word so_error = 0x1007;
static const Word so_type = 0x1008;
static const Word so_conndata = 0x7000;
static const Word so_connopt = 0x7001;
static const Word so_discdata = 0x7002;
static const Word so_discopt = 0x7003;
static const Word so_conndatalen = 0x7004;
static const Word so_connoptlen = 0x7005;
static const Word so_discdatalen = 0x7006;
static const Word so_discoptlen = 0x7007;
static const Word so_opentype = 0x7008;
static const Shortint so_synchronous_alert = 0x10;
static const Shortint so_synchronous_nonalert = 0x20;
static const Word so_maxdg = 0x7009;
static const Word so_maxpathdg = 0x700a;
static const Word so_update_accept_context = 0x700b;
static const Word so_connect_time = 0x700c;
static const Shortint tcp_nodelay = 0x1;
static const Word tcp_bsdurgent = 0x7000;
static const Word so_group_id = 0x2001;
static const Word so_group_priority = 0x2002;
static const Word so_max_msg_size = 0x2003;
static const Word SO_Protocol_InfoA = 0x2004;
static const Word SO_Protocol_InfoW = 0x2005;
static const Word SO_Protocol_Info = 0x2004;
static const Word pvd_config = 0x3001;
static const Word so_conditional_accept = 0x3002;
static const Shortint af_unspec = 0x0;
static const Shortint af_unix = 0x1;
static const Shortint af_inet = 0x2;
static const Shortint af_implink = 0x3;
static const Shortint af_pup = 0x4;
static const Shortint af_chaos = 0x5;
static const Shortint af_ipx = 0x6;
static const Shortint af_ns = 0x6;
static const Shortint af_iso = 0x7;
static const Shortint af_osi = 0x7;
static const Shortint af_ecma = 0x8;
static const Shortint af_datakit = 0x9;
static const Shortint af_ccitt = 0xa;
static const Shortint af_sna = 0xb;
static const Shortint af_decnet = 0xc;
static const Shortint af_dli = 0xd;
static const Shortint af_lat = 0xe;
static const Shortint af_hylink = 0xf;
static const Shortint af_appletalk = 0x10;
static const Shortint af_netbios = 0x11;
static const Shortint af_voiceview = 0x12;
static const Shortint af_firefox = 0x13;
static const Shortint af_unknown1 = 0x14;
static const Shortint af_ban = 0x15;
static const Shortint af_atm = 0x16;
static const Shortint af_inet6 = 0x17;
static const Shortint af_cluster = 0x18;
static const Shortint af_12844 = 0x19;
static const Shortint af_irda = 0x1a;
static const Shortint af_netdes = 0x1c;
static const Shortint af_tcnprocess = 0x1d;
static const Shortint af_tcnmessage = 0x1e;
static const Shortint af_iclfxbm = 0x1f;
static const Shortint af_max = 0x20;
static const Shortint pf_unspec = 0x0;
static const Shortint pf_unix = 0x1;
static const Shortint pf_inet = 0x2;
static const Shortint pf_implink = 0x3;
static const Shortint pf_pup = 0x4;
static const Shortint pf_chaos = 0x5;
static const Shortint pf_ns = 0x6;
static const Shortint pf_ipx = 0x6;
static const Shortint pf_iso = 0x7;
static const Shortint pf_osi = 0x7;
static const Shortint pf_ecma = 0x8;
static const Shortint pf_datakit = 0x9;
static const Shortint pf_ccitt = 0xa;
static const Shortint pf_sna = 0xb;
static const Shortint pf_decnet = 0xc;
static const Shortint pf_dli = 0xd;
static const Shortint pf_lat = 0xe;
static const Shortint pf_hylink = 0xf;
static const Shortint pf_appletalk = 0x10;
static const Shortint pf_voiceview = 0x12;
static const Shortint pf_firefox = 0x13;
static const Shortint pf_unknown1 = 0x14;
static const Shortint pf_ban = 0x15;
static const Shortint pf_atm = 0x16;
static const Shortint pf_inet6 = 0x17;
static const Shortint pf_max = 0x20;
static const Shortint inaddr_any = 0x0;
static const int inaddr_loopback = 0x7f000001;
static const unsigned inaddr_broadcast = 0xffffffff;
static const unsigned inaddr_none = 0xffffffff;
static const Shortint addr_any = 0x0;
static const Word sol_socket = 0xffff;
static const Shortint msg_oob = 0x1;
static const Shortint msg_peek = 0x2;
static const Shortint msg_dontroute = 0x4;
static const Word msg_partial = 0x8000;
static const Shortint msg_interrupt = 0x10;
static const Shortint msg_maxiovlen = 0x10;
static const Word maxgethoststruct = 0x400;
static const int somaxconn = 0x7fffffff;
static const Shortint fd_read_bit = 0x0;
static const Shortint fd_write_bit = 0x1;
static const Shortint fd_oob_bit = 0x2;
static const Shortint fd_accept_bit = 0x3;
static const Shortint fd_connect_bit = 0x4;
static const Shortint fd_close_bit = 0x5;
static const Shortint fd_qos_bit = 0x6;
static const Shortint fd_group_qos_bit = 0x7;
static const Shortint fd_routing_interface_change_bit = 0x8;
static const Shortint fd_address_list_change_bit = 0x9;
static const Shortint fd_max_events = 0xa;
static const Shortint fd_read = 0x1;
static const Shortint fd_write = 0x2;
static const Shortint fd_oob = 0x4;
static const Shortint fd_accept = 0x8;
static const Shortint fd_connect = 0x10;
static const Shortint fd_close = 0x20;
static const Shortint fd_qos = 0x40;
static const Byte fd_group_qos = 0x80;
static const Word fd_routing_interface_change = 0x100;
static const Word fd_address_list_change = 0x200;
static const Word fd_all_events = 0x3ff;
static const Word wsabaseerr = 0x2710;
static const Word wsaeintr = 0x2714;
static const Word wsaebadf = 0x2719;
static const Word wsaeacces = 0x271d;
static const Word wsaefault = 0x271e;
static const Word wsaeinval = 0x2726;
static const Word wsaemfile = 0x2728;
static const Word wsaewouldblock = 0x2733;
static const Word wsaeinprogress = 0x2734;
static const Word wsaealready = 0x2735;
static const Word wsaenotsock = 0x2736;
static const Word wsaedestaddrreq = 0x2737;
static const Word wsaemsgsize = 0x2738;
static const Word wsaeprototype = 0x2739;
static const Word wsaenoprotoopt = 0x273a;
static const Word wsaeprotonosupport = 0x273b;
static const Word wsaesocktnosupport = 0x273c;
static const Word wsaeopnotsupp = 0x273d;
static const Word wsaepfnosupport = 0x273e;
static const Word wsaeafnosupport = 0x273f;
static const Word wsaeaddrinuse = 0x2740;
static const Word wsaeaddrnotavail = 0x2741;
static const Word wsaenetdown = 0x2742;
static const Word wsaenetunreach = 0x2743;
static const Word wsaenetreset = 0x2744;
static const Word wsaeconnaborted = 0x2745;
static const Word wsaeconnreset = 0x2746;
static const Word wsaenobufs = 0x2747;
static const Word wsaeisconn = 0x2748;
static const Word wsaenotconn = 0x2749;
static const Word wsaeshutdown = 0x274a;
static const Word wsaetoomanyrefs = 0x274b;
static const Word wsaetimedout = 0x274c;
static const Word wsaeconnrefused = 0x274d;
static const Word wsaeloop = 0x274e;
static const Word wsaenametoolong = 0x274f;
static const Word wsaehostdown = 0x2750;
static const Word wsaehostunreach = 0x2751;
static const Word wsaenotempty = 0x2752;
static const Word wsaeproclim = 0x2753;
static const Word wsaeusers = 0x2754;
static const Word wsaedquot = 0x2755;
static const Word wsaestale = 0x2756;
static const Word wsaeremote = 0x2757;
static const Word wsasysnotready = 0x276b;
static const Word wsavernotsupported = 0x276c;
static const Word wsanotinitialised = 0x276d;
static const Word wsaediscon = 0x2775;
static const Word wsaenomore = 0x2776;
static const Word wsaecancelled = 0x2777;
static const Word wsaeinvalidproctable = 0x2778;
static const Word wsaeinvalidprovider = 0x2779;
static const Word wsaeproviderfailedinit = 0x277a;
static const Word wsasyscallfailure = 0x277b;
static const Word wsaservice_not_found = 0x277c;
static const Word wsatype_not_found = 0x277d;
static const Word wsa_e_no_more = 0x277e;
static const Word wsa_e_cancelled = 0x277f;
static const Word wsaerefused = 0x2780;
static const Word wsahost_not_found = 0x2af9;
static const Word host_not_found = 0x2af9;
static const Word wsatry_again = 0x2afa;
static const Word try_again = 0x2afa;
static const Word wsano_recovery = 0x2afb;
static const Word no_recovery = 0x2afb;
static const Word wsano_data = 0x2afc;
static const Word no_data = 0x2afc;
static const Word wsano_address = 0x2afc;
static const Word no_address = 0x2afc;
static const Word wsa_qos_receivers = 0x2afd;
static const Word wsa_qos_senders = 0x2afe;
static const Word wsa_qos_no_senders = 0x2aff;
static const Word wsa_qos_no_receivers = 0x2b00;
static const Word wsa_qos_request_confirmed = 0x2b01;
static const Word wsa_qos_admission_failure = 0x2b02;
static const Word wsa_qos_policy_failure = 0x2b03;
static const Word wsa_qos_bad_style = 0x2b04;
static const Word wsa_qos_bad_object = 0x2b05;
static const Word wsa_qos_traffic_ctrl_error = 0x2b06;
static const Word wsa_qos_generic_error = 0x2b07;
static const Word wsa_qos_eservicetype = 0x2b08;
static const Word wsa_qos_eflowspec = 0x2b09;
static const Word wsa_qos_eprovspecbuf = 0x2b0a;
static const Word wsa_qos_efilterstyle = 0x2b0b;
static const Word wsa_qos_efiltertype = 0x2b0c;
static const Word wsa_qos_efiltercount = 0x2b0d;
static const Word wsa_qos_eobjlength = 0x2b0e;
static const Word wsa_qos_eflowcount = 0x2b0f;
static const Word wsa_qos_eunkownpsobj = 0x2b10;
static const Word wsa_qos_epolicyobj = 0x2b11;
static const Word wsa_qos_eflowdesc = 0x2b12;
static const Word wsa_qos_epsflowspec = 0x2b13;
static const Word wsa_qos_epsfilterspec = 0x2b14;
static const Word wsa_qos_esdmodeobj = 0x2b15;
static const Word wsa_qos_eshaperateobj = 0x2b16;
static const Word wsa_qos_reserved_petype = 0x2b17;
static const Word wsa_io_pending = 0x3e5;
static const Word wsa_io_incomplete = 0x3e4;
static const Shortint wsa_invalid_handle = 0x6;
static const Shortint wsa_invalid_parameter = 0x57;
static const Shortint wsa_not_enough_memory = 0x8;
static const Word wsa_operation_aborted = 0x3e3;
static const unsigned wsa_invalid_event = 0x0;
static const Shortint wsa_maximum_wait_events = 0x40;
static const unsigned wsa_wait_failed = 0xffffffff;
static const Shortint wsa_wait_event_0 = 0x0;
static const Byte wsa_wait_io_completion = 0xc0;
static const Word wsa_wait_timeout = 0x102;
static const unsigned wsa_infinite = 0xffffffff;
static const Word ewouldblock = 0x2733;
static const Word einprogress = 0x2734;
static const Word ealready = 0x2735;
static const Word enotsock = 0x2736;
static const Word edestaddrreq = 0x2737;
static const Word emsgsize = 0x2738;
static const Word eprototype = 0x2739;
static const Word enoprotoopt = 0x273a;
static const Word eprotonosupport = 0x273b;
static const Word esocktnosupport = 0x273c;
static const Word eopnotsupp = 0x273d;
static const Word epfnosupport = 0x273e;
static const Word eafnosupport = 0x273f;
static const Word eaddrinuse = 0x2740;
static const Word eaddrnotavail = 0x2741;
static const Word enetdown = 0x2742;
static const Word enetunreach = 0x2743;
static const Word enetreset = 0x2744;
static const Word econnaborted = 0x2745;
static const Word econnreset = 0x2746;
static const Word enobufs = 0x2747;
static const Word eisconn = 0x2748;
static const Word enotconn = 0x2749;
static const Word eshutdown = 0x274a;
static const Word etoomanyrefs = 0x274b;
static const Word etimedout = 0x274c;
static const Word econnrefused = 0x274d;
static const Word eloop = 0x274e;
static const Word enametoolong = 0x274f;
static const Word ehostdown = 0x2750;
static const Word ehostunreach = 0x2751;
static const Word enotempty = 0x2752;
static const Word eproclim = 0x2753;
static const Word eusers = 0x2754;
static const Word edquot = 0x2755;
static const Word estale = 0x2756;
static const Word eremote = 0x2757;
static const Word wsadescription_len = 0x100;
static const Byte wsasys_status_len = 0x80;
static const Shortint servicetype_notraffic = 0x0;
static const Shortint servicetype_besteffort = 0x1;
static const Shortint servicetype_controlledload = 0x2;
static const Shortint servicetype_guaranteed = 0x3;
static const Shortint servicetype_network_unavailable = 0x4;
static const Shortint servicetype_general_information = 0x5;
static const Shortint servicetype_nochange = 0x6;
static const unsigned service_immediate_traffic_control = 0x80000000;
static const Shortint cf_accept = 0x0;
static const Shortint cf_reject = 0x1;
static const Shortint cf_defer = 0x2;
static const Shortint sd_receive = 0x0;
static const Shortint sd_send = 0x1;
static const Shortint sd_both = 0x2;
static const Shortint sg_unconstrained_group = 0x1;
static const Shortint sg_constrained_group = 0x2;
static const Shortint pfl_multiple_proto_entries = 0x1;
static const Shortint pfl_recommended_proto_entry = 0x2;
static const Shortint pfl_hidden = 0x4;
static const Shortint pfl_matches_protocol_zero = 0x8;
static const Shortint xp1_connectionless = 0x1;
static const Shortint xp1_guaranteed_delivery = 0x2;
static const Shortint xp1_guaranteed_order = 0x4;
static const Shortint xp1_message_oriented = 0x8;
static const Shortint xp1_pseudo_stream = 0x10;
static const Shortint xp1_graceful_close = 0x20;
static const Shortint xp1_expedited_data = 0x40;
static const Byte xp1_connect_data = 0x80;
static const Word xp1_disconnect_data = 0x100;
static const Word xp1_support_broadcast = 0x200;
static const Word xp1_support_multipoint = 0x400;
static const Word xp1_multipoint_control_plane = 0x800;
static const Word xp1_multipoint_data_plane = 0x1000;
static const Word xp1_qos_supported = 0x2000;
static const Word xp1_interrupt = 0x4000;
static const Word xp1_uni_send = 0x8000;
static const int xp1_uni_recv = 0x10000;
static const int xp1_ifs_handles = 0x20000;
static const int xp1_partial_message = 0x40000;
static const Shortint bigendian = 0x0;
static const Shortint littleendian = 0x1;
static const Shortint security_protocol_none = 0x0;
static const Shortint jl_sender_only = 0x1;
static const Shortint jl_receiver_only = 0x2;
static const Shortint jl_both = 0x4;
static const Shortint wsa_flag_overlapped = 0x1;
static const Shortint wsa_flag_multipoint_c_root = 0x2;
static const Shortint wsa_flag_multipoint_c_leaf = 0x4;
static const Shortint wsa_flag_multipoint_d_root = 0x8;
static const Shortint wsa_flag_multipoint_d_leaf = 0x10;
static const Shortint ioc_unix = 0x0;
static const int ioc_ws2 = 0x8000000;
static const int ioc_protocol = 0x10000000;
static const int ioc_vendor = 0x18000000;
static const unsigned sio_associate_handle = 0x88000001;
static const int sio_enable_circular_queueing = 0x28000002;
static const int sio_find_route = 0x48000003;
static const int sio_flush = 0x28000004;
static const int sio_get_broadcast_address = 0x48000005;
static const unsigned sio_get_extension_function_pointer = 0xc8000006;
static const unsigned sio_get_qos = 0xc8000007;
static const unsigned sio_get_group_qos = 0xc8000008;
static const unsigned sio_multipoint_loopback = 0x88000009;
static const unsigned sio_multicast_scope = 0x8800000a;
static const unsigned sio_set_qos = 0x8800000b;
static const unsigned sio_set_group_qos = 0x8800000c;
static const unsigned sio_translate_handle = 0xc800000d;
static const unsigned sio_routing_interface_query = 0xc8000014;
static const unsigned sio_routing_interface_change = 0x88000015;
static const int sio_address_list_query = 0x48000016;
static const int sio_address_list_change = 0x28000017;
static const int sio_query_target_pnp_handle = 0x48000018;
static const unsigned sio_address_list_sort = 0xc8000019;
static const Shortint th_netdev = 0x1;
static const Shortint th_tapi = 0x2;
static const Shortint service_multiple = 0x1;
static const Shortint ns_all = 0x0;
static const Shortint ns_sap = 0x1;
static const Shortint ns_nds = 0x2;
static const Shortint ns_peer_browse = 0x3;
static const Shortint ns_tcpip_local = 0xa;
static const Shortint ns_tcpip_hosts = 0xb;
static const Shortint ns_dns = 0xc;
static const Shortint ns_netbt = 0xd;
static const Shortint ns_wins = 0xe;
static const Shortint ns_nbp = 0x14;
static const Shortint ns_ms = 0x1e;
static const Shortint ns_stda = 0x1f;
static const Shortint ns_ntds = 0x20;
static const Shortint ns_x500 = 0x28;
static const Shortint ns_nis = 0x29;
static const Shortint ns_nisplus = 0x2a;
static const Shortint ns_wrq = 0x32;
static const Shortint ns_netdes = 0x3c;
static const Shortint res_unused_1 = 0x1;
static const Shortint res_flush_cache = 0x2;
static const Shortint res_service = 0x4;
#define service_type_value_ipxporta "IpxSocket"
#define service_type_value_sapida "SapId"
#define service_type_value_tcpporta "TcpPort"
#define service_type_value_udpporta "UdpPort"
#define service_type_value_objectida "ObjectId"
extern PACKAGE WideChar *service_type_value_ipxportw;
extern PACKAGE WideChar *service_type_value_sapidw;
extern PACKAGE WideChar *service_type_value_tcpportw;
extern PACKAGE WideChar *service_type_value_udpportw;
extern PACKAGE WideChar *service_type_value_objectidw;
#define service_type_value_sapid "SapId"
#define service_type_value_tcpport "TcpPort"
#define service_type_value_udpport "UdpPort"
#define service_type_value_objectid "ObjectId"
static const Shortint lup_deep = 0x1;
static const Shortint lup_containers = 0x2;
static const Shortint lup_nocontainers = 0x4;
static const Shortint lup_nearest = 0x8;
static const Shortint lup_return_name = 0x10;
static const Shortint lup_return_type = 0x20;
static const Shortint lup_return_version = 0x40;
static const Byte lup_return_comment = 0x80;
static const Word lup_return_addr = 0x100;
static const Word lup_return_blob = 0x200;
static const Word lup_return_aliases = 0x400;
static const Word lup_return_query_string = 0x800;
static const Word lup_return_all = 0xff0;
static const Word lup_res_service = 0x8000;
static const Word lup_flushcache = 0x1000;
static const Word lup_flushprevious = 0x2000;
static const Shortint result_is_alias = 0x1;
// static const int MAX_NATURAL_ALIGNMENT = 0x4;
// static const Shortint MEMORY_ALLOCATION_ALIGNMENT = 0x8;
static const int SIO_GET_INTERFACE_LIST = 0x4004747f;
static const int SIO_GET_INTERFACE_LIST_EX = 0x4004747e;
static const Shortint ip_options = 0x1;
static const Shortint ip_hdrincl = 0x2;
static const Shortint ip_tos = 0x3;
static const Shortint ip_ttl = 0x4;
static const Shortint ip_multicast_if = 0x9;
static const Shortint ip_multicast_ttl = 0xa;
static const Shortint ip_multicast_loop = 0xb;
static const Shortint ip_add_membership = 0xc;
static const Shortint ip_drop_membership = 0xd;
static const Shortint ip_dontfragment = 0xe;
static const Shortint ip_add_source_membership = 0xf;
static const Shortint ip_drop_source_membership = 0x10;
static const Shortint ip_block_source = 0x11;
static const Shortint ip_unblock_source = 0x12;
static const Shortint ip_pktinfo = 0x13;
static const Shortint ip_receive_broadcast = 0x16;
static const Shortint ip_default_multicast_ttl = 0x1;
static const Shortint ip_default_multicast_loop = 0x1;
static const Shortint ip_max_memberships = 0x14;
static const Shortint UDP_NOCHECKSUM = 0x1;
static const Shortint TCP_EXPEDITED_1122 = 0x2;
static const Byte _SS_MAXSIZE = 0x80;
static const int _SS_ALIGNSIZE = 0x8;
static const Shortint _SS_PAD1SIZE = 0x6;
static const Shortint _SS_PAD2SIZE = 0x70;
static const Word IP6F_OFF_MASK = 0xf8ff;
static const Word IP6F_RESERVED_MASK = 0x600;
static const Word IP6F_MORE_FRAG = 0x100;
static const Shortint IP6_ALERT_MLD = 0x0;
static const Word IP6_ALERT_RSVP = 0x100;
static const Word IP6_ALERT_AN = 0x200;
static const Shortint IP6OPT_TYPE_SKIP = 0x0;
static const Shortint IP6OPT_TYPE_DISCARD = 0x40;
static const Byte IP6OPT_TYPE_FORCEICMP = 0x80;
static const Byte IP6OPT_TYPE_ICMP = 0xc0;
static const Shortint IP6OPT_MUTABLE = 0x20;
static const Shortint IP6OPT_PAD1 = 0x0;
static const Shortint IP6OPT_PADN = 0x1;
static const Byte IP6OPT_JUMBO = 0xc2;
static const Byte IP6OPT_NSAP_ADDR = 0xc3;
static const Shortint IP6OPT_TUNNEL_LIMIT = 0x4;
static const Shortint IP6OPT_ROUTER_ALERT = 0x5;
static const Shortint IP6OPT_JUMBO_LEN = 0x6;
static const Shortint ICMP6_DST_UNREACH = 0x1;
static const Shortint ICMP6_PACKET_TOO_BIG = 0x2;
static const Shortint ICMP6_TIME_EXCEEDED = 0x3;
static const Shortint ICMP6_PARAM_PROB = 0x4;
static const Byte ICMP6_INFOMSG_MASK = 0x80;
static const Byte ICMP6_ECHO_REQUEST = 0x80;
static const Byte ICMP6_ECHO_REPLY = 0x81;
static const Shortint ICMP6_DST_UNREACH_NOROUTE = 0x0;
static const Shortint ICMP6_DST_UNREACH_ADMIN = 0x1;
static const Shortint ICMP6_DST_UNREACH_BEYONDSCOPE = 0x2;
static const Shortint ICMP6_DST_UNREACH_ADDR = 0x3;
static const Shortint ICMP6_DST_UNREACH_NOPORT = 0x4;
static const Shortint ICMP6_TIME_EXCEED_TRANSIT = 0x0;
static const Shortint ICMP6_TIME_EXCEED_REASSEMBLY = 0x1;
static const Shortint ICMP6_PARAMPROB_HEADER = 0x0;
static const Shortint ICMP6_PARAMPROB_NEXTHEADER = 0x1;
static const Shortint ICMP6_PARAMPROB_OPTION = 0x2;
static const Byte ND_ROUTER_SOLICIT = 0x85;
static const Byte ND_ROUTER_ADVERT = 0x86;
static const Byte ND_NEIGHBOR_SOLICIT = 0x87;
static const Byte ND_NEIGHBOR_ADVERT = 0x88;
static const Byte ND_REDIRECT = 0x89;
static const Shortint ND_OPT_SOURCE_LINKADDR = 0x1;
static const Shortint ND_OPT_TARGET_LINKADDR = 0x2;
static const Shortint ND_OPT_PREFIX_INFORMATION = 0x3;
static const Shortint ND_OPT_REDIRECTED_HEADER = 0x4;
static const Shortint ND_OPT_MTU = 0x5;
static const Byte ND_OPT_PI_FLAG_ONLINK = 0x80;
static const Shortint ND_OPT_PI_FLAG_AUTO = 0x40;
static const Byte MLD_LISTENER_QUERY = 0x82;
static const Byte MLD_LISTENER_REPORT = 0x83;
static const Byte MLD_LISTENER_REDUCTION = 0x84;
static const Byte ND_NA_FLAG_ROUTER = 0x80;
static const Shortint ND_NA_FLAG_SOLICITED = 0x40;
static const Shortint ND_NA_FLAG_OVERRIDE = 0x20;
static const Shortint IFF_UP = 0x1;
static const Shortint IFF_BROADCAST = 0x2;
static const Shortint IFF_LOOPBACK = 0x4;
static const Shortint IFF_POINTTOPOINT = 0x8;
static const Shortint IFF_MULTICAST = 0x10;
static const Word NSPROTO_IPX = 0x3e8;
static const Word NSPROTO_SPX = 0x4e8;
static const Word NSPROTO_SPXII = 0x4e9;
static const Word IPX_PTYPE = 0x4000;
static const Word IPX_FILTERPTYPE = 0x4001;
static const Word IPX_STOPFILTERPTYPE = 0x4003;
static const Word IPX_DSTYPE = 0x4002;
static const Word IPX_EXTENDED_ADDRESS = 0x4004;
static const Word IPX_RECVHDR = 0x4005;
static const Word IPX_MAXSIZE = 0x4006;
static const Word IPX_ADDRESS = 0x4007;
static const Word IPX_GETNETINFO = 0x4008;
static const Word IPX_GETNETINFO_NORIP = 0x4009;
static const Word IPX_SPXGETCONNECTIONSTATUS = 0x400b;
static const Word IPX_ADDRESS_NOTIFY = 0x400c;
static const Word IPX_MAX_ADAPTER_NUM = 0x400d;
static const Word IPX_RERIPNETNUMBER = 0x400e;
static const Word IPX_RECEIVE_BROADCAST = 0x400f;
static const Word IPX_IMMEDIATESPXACK = 0x4010;
static const Shortint NETBIOS_NAME_LENGTH = 0x10;
static const Shortint NETBIOS_UNIQUE_NAME = 0x0;
static const Shortint NETBIOS_GROUP_NAME = 0x1;
static const Shortint NETBIOS_TYPE_QUICK_UNIQUE = 0x2;
static const Shortint NETBIOS_TYPE_QUICK_GROUP = 0x3;
static const Shortint ATMPROTO_AALUSER = 0x0;
static const Shortint ATMPROTO_AAL1 = 0x1;
static const Shortint ATMPROTO_AAL2 = 0x2;
static const Shortint ATMPROTO_AAL34 = 0x3;
static const Shortint ATMPROTO_AAL5 = 0x5;
static const unsigned SAP_FIELD_ABSENT = 0xfffffffe;
static const unsigned SAP_FIELD_ANY = 0xffffffff;
static const unsigned SAP_FIELD_ANY_AESA_SEL = 0xfffffffa;
static const unsigned SAP_FIELD_ANY_AESA_REST = 0xfffffffb;
static const Shortint ATM_E164 = 0x1;
static const Shortint ATM_NSAP = 0x2;
static const Shortint ATM_AESA = 0x2;
static const Shortint ATM_ADDR_SIZE = 0x14;
static const Shortint BLLI_L2_ISO_1745 = 0x1;
static const Shortint BLLI_L2_Q921 = 0x2;
static const Shortint BLLI_L2_X25L = 0x6;
static const Shortint BLLI_L2_X25M = 0x7;
static const Shortint BLLI_L2_ELAPB = 0x8;
static const Shortint BLLI_L2_HDLC_NRM = 0x9;
static const Shortint BLLI_L2_HDLC_ABM = 0xa;
static const Shortint BLLI_L2_HDLC_ARM = 0xb;
static const Shortint BLLI_L2_LLC = 0xc;
static const Shortint BLLI_L2_X75 = 0xd;
static const Shortint BLLI_L2_Q922 = 0xe;
static const Shortint BLLI_L2_USER_SPECIFIED = 0x10;
static const Shortint BLLI_L2_ISO_7776 = 0x11;
static const Shortint BLLI_L3_X25 = 0x6;
static const Shortint BLLI_L3_ISO_8208 = 0x7;
static const Shortint BLLI_L3_X223 = 0x8;
static const Shortint BLLI_L3_SIO_8473 = 0x9;
static const Shortint BLLI_L3_T70 = 0xa;
static const Shortint BLLI_L3_ISO_TR9577 = 0xb;
static const Shortint BLLI_L3_USER_SPECIFIED = 0x10;
static const Byte BLLI_L3_IPI_SNAP = 0x80;
static const Byte BLLI_L3_IPI_IP = 0xcc;
static const Shortint BHLI_ISO = 0x0;
static const Shortint BHLI_UserSpecific = 0x1;
static const Shortint BHLI_HighLayerProfile = 0x2;
static const Shortint BHLI_VendorSpecificAppId = 0x3;
static const Shortint AALTYPE_5 = 0x5;
static const Shortint AALTYPE_USER = 0x10;
static const Shortint AAL5_MODE_MESSAGE = 0x1;
static const Shortint AAL5_MODE_STREAMING = 0x2;
static const Shortint AAL5_SSCS_NULL = 0x0;
static const Shortint AAL5_SSCS_SSCOP_ASSURED = 0x1;
static const Shortint AAL5_SSCS_SSCOP_NON_ASSURED = 0x2;
static const Shortint AAL5_SSCS_FRAME_RELAY = 0x4;
static const Shortint BCOB_A = 0x1;
static const Shortint BCOB_C = 0x3;
static const Shortint BCOB_X = 0x10;
static const Shortint TT_NOIND = 0x0;
static const Shortint TT_CBR = 0x4;
static const Shortint TT_VBR = 0x6;
static const Shortint TR_NOIND = 0x0;
static const Shortint TR_END_TO_END = 0x1;
static const Shortint TR_NO_END_TO_END = 0x2;
static const Shortint CLIP_NOT = 0x0;
static const Shortint CLIP_SUS = 0x20;
static const Shortint UP_P2P = 0x0;
static const Shortint UP_P2MP = 0x1;
static const Shortint BLLI_L2_MODE_NORMAL = 0x40;
static const Byte BLLI_L2_MODE_EXT = 0x80;
static const Shortint BLLI_L3_MODE_NORMAL = 0x40;
static const Byte BLLI_L3_MODE_EXT = 0x80;
static const Shortint BLLI_L3_PACKET_16 = 0x4;
static const Shortint BLLI_L3_PACKET_32 = 0x5;
static const Shortint BLLI_L3_PACKET_64 = 0x6;
static const Shortint BLLI_L3_PACKET_128 = 0x7;
static const Shortint BLLI_L3_PACKET_256 = 0x8;
static const Shortint BLLI_L3_PACKET_512 = 0x9;
static const Shortint BLLI_L3_PACKET_1024 = 0xa;
static const Shortint BLLI_L3_PACKET_2048 = 0xb;
static const Shortint BLLI_L3_PACKET_4096 = 0xc;
static const Shortint PI_ALLOWED = 0x0;
static const Shortint PI_RESTRICTED = 0x40;
static const Byte PI_NUMBER_NOT_AVAILABLE = 0x80;
static const Shortint SI_USER_NOT_SCREENED = 0x0;
static const Shortint SI_USER_PASSED = 0x1;
static const Shortint SI_USER_FAILED = 0x2;
static const Shortint SI_NETWORK = 0x3;
static const Shortint CAUSE_LOC_USER = 0x0;
static const Shortint CAUSE_LOC_PRIVATE_LOCAL = 0x1;
static const Shortint CAUSE_LOC_PUBLIC_LOCAL = 0x2;
static const Shortint CAUSE_LOC_TRANSIT_NETWORK = 0x3;
static const Shortint CAUSE_LOC_PUBLIC_REMOTE = 0x4;
static const Shortint CAUSE_LOC_PRIVATE_REMOTE = 0x5;
static const Shortint CAUSE_LOC_INTERNATIONAL_NETWORK = 0x6;
static const Shortint CAUSE_LOC_BEYOND_INTERWORKING = 0xa;
static const Shortint CAUSE_UNALLOCATED_NUMBER = 0x1;
static const Shortint CAUSE_NO_ROUTE_TO_TRANSIT_NETWORK = 0x2;
static const Shortint CAUSE_NO_ROUTE_TO_DESTINATION = 0x3;
static const Shortint CAUSE_VPI_VCI_UNACCEPTABLE = 0xa;
static const Shortint CAUSE_NORMAL_CALL_CLEARING = 0x10;
static const Shortint CAUSE_USER_BUSY = 0x11;
static const Shortint CAUSE_NO_USER_RESPONDING = 0x12;
static const Shortint CAUSE_CALL_REJECTED = 0x15;
static const Shortint CAUSE_NUMBER_CHANGED = 0x16;
static const Shortint CAUSE_USER_REJECTS_CLIR = 0x17;
static const Shortint CAUSE_DESTINATION_OUT_OF_ORDER = 0x1b;
static const Shortint CAUSE_INVALID_NUMBER_FORMAT = 0x1c;
static const Shortint CAUSE_STATUS_ENQUIRY_RESPONSE = 0x1e;
static const Shortint CAUSE_NORMAL_UNSPECIFIED = 0x1f;
static const Shortint CAUSE_VPI_VCI_UNAVAILABLE = 0x23;
static const Shortint CAUSE_NETWORK_OUT_OF_ORDER = 0x26;
static const Shortint CAUSE_TEMPORARY_FAILURE = 0x29;
static const Shortint CAUSE_ACCESS_INFORMAION_DISCARDED = 0x2b;
static const Shortint CAUSE_NO_VPI_VCI_AVAILABLE = 0x2d;
static const Shortint CAUSE_RESOURCE_UNAVAILABLE = 0x2f;
static const Shortint CAUSE_QOS_UNAVAILABLE = 0x31;
static const Shortint CAUSE_USER_CELL_RATE_UNAVAILABLE = 0x33;
static const Shortint CAUSE_BEARER_CAPABILITY_UNAUTHORIZED = 0x39;
static const Shortint CAUSE_BEARER_CAPABILITY_UNAVAILABLE = 0x3a;
static const Shortint CAUSE_OPTION_UNAVAILABLE = 0x3f;
static const Shortint CAUSE_BEARER_CAPABILITY_UNIMPLEMENTED = 0x41;
static const Shortint CAUSE_UNSUPPORTED_TRAFFIC_PARAMETERS = 0x49;
static const Shortint CAUSE_INVALID_CALL_REFERENCE = 0x51;
static const Shortint CAUSE_CHANNEL_NONEXISTENT = 0x52;
static const Shortint CAUSE_INCOMPATIBLE_DESTINATION = 0x58;
static const Shortint CAUSE_INVALID_ENDPOINT_REFERENCE = 0x59;
static const Shortint CAUSE_INVALID_TRANSIT_NETWORK_SELECTION = 0x5b;
static const Shortint CAUSE_TOO_MANY_PENDING_ADD_PARTY = 0x5c;
static const Shortint CAUSE_AAL_PARAMETERS_UNSUPPORTED = 0x5d;
static const Shortint CAUSE_MANDATORY_IE_MISSING = 0x60;
static const Shortint CAUSE_UNIMPLEMENTED_MESSAGE_TYPE = 0x61;
static const Shortint CAUSE_UNIMPLEMENTED_IE = 0x63;
static const Shortint CAUSE_INVALID_IE_CONTENTS = 0x64;
static const Shortint CAUSE_INVALID_STATE_FOR_MESSAGE = 0x65;
static const Shortint CAUSE_RECOVERY_ON_TIMEOUT = 0x66;
static const Shortint CAUSE_INCORRECT_MESSAGE_LENGTH = 0x68;
static const Shortint CAUSE_PROTOCOL_ERROR = 0x6f;
static const Shortint CAUSE_COND_UNKNOWN = 0x0;
static const Shortint CAUSE_COND_PERMANENT = 0x1;
static const Shortint CAUSE_COND_TRANSIENT = 0x2;
static const Shortint CAUSE_REASON_USER = 0x0;
static const Shortint CAUSE_REASON_IE_MISSING = 0x4;
static const Shortint CAUSE_REASON_IE_INSUFFICIENT = 0x8;
static const Shortint CAUSE_PU_PROVIDER = 0x0;
static const Shortint CAUSE_PU_USER = 0x8;
static const Shortint CAUSE_NA_NORMAL = 0x0;
static const Shortint CAUSE_NA_ABNORMAL = 0x4;
static const Shortint QOS_CLASS0 = 0x0;
static const Shortint QOS_CLASS1 = 0x1;
static const Shortint QOS_CLASS2 = 0x2;
static const Shortint QOS_CLASS3 = 0x3;
static const Shortint QOS_CLASS4 = 0x4;
static const Shortint TNS_TYPE_NATIONAL = 0x40;
static const Shortint TNS_PLAN_CARRIER_ID_CODE = 0x1;
static const int SIO_GET_NUMBER_OF_ATM_DEVICES = 0x50160001;
static const unsigned SIO_GET_ATM_ADDRESS = 0xd0160002;
static const unsigned SIO_ASSOCIATE_PVC = 0x90160003;
static const int SIO_GET_ATM_CONNECTION_ID = 0x50160004;
extern PACKAGE bool __fastcall Winsock2Loaded(void);
extern PACKAGE BOOL __fastcall ServiceQueryTransmitFile(int hSocket, unsigned hFile, unsigned nNumberOfBytesToWrite, unsigned nNumberOfBytesPerSend, Windows::POverlapped lpOverlapped, PTransmitFileBuffers lpTransmitBuffers, unsigned dwReserved);
extern PACKAGE int __stdcall WSAStartup(const Word wVersionRequired, TWSAData &WSData);
extern PACKAGE int __fastcall WSAMakeSyncReply(Word Buflen, Word Error);
extern PACKAGE int __fastcall WSAMakeSelectReply(Word Event, Word Error);
extern PACKAGE Word __fastcall WSAGetAsyncBuflen(int Param);
extern PACKAGE Word __fastcall WSAGetAsyncError(int Param);
extern PACKAGE Word __fastcall WSAGetSelectEvent(int Param);
extern PACKAGE Word __fastcall WSAGetSelectError(int Param);
extern PACKAGE void __fastcall fd_clr(int Socket, TFDSet &FDSet);
extern PACKAGE bool __fastcall fd_isset(int Socket, TFDSet &FDSet);
extern PACKAGE void __fastcall fd_set(int Socket, TFDSet &FDSet);
extern PACKAGE void __fastcall fd_zero(TFDSet &FDSet);
extern PACKAGE void __fastcall SET_NETBIOS_SOCKADDR(PSockAddrNB snb, const Word SnbType, const char * Name, const char Port);
extern PACKAGE Byte __fastcall IP6OPT_TYPE(const Byte o);
extern PACKAGE unsigned __fastcall TYPE_ALIGNMENT(const unsigned AInt);
extern PACKAGE unsigned __fastcall WSA_CMSGHDR_ALIGN(unsigned length);
extern PACKAGE unsigned __fastcall WSA_CMSGDATA_ALIGN(unsigned length);
extern PACKAGE PWSACMSGHDR __fastcall WSA_CMSG_FIRSTHDR(PWSAMSG msg);
extern PACKAGE PWSACMSGHDR __fastcall WSA_CMSG_NXTHDR(PWSAMSG msg, PWSACMSGHDR cmsg);
extern PACKAGE void * __fastcall WSA_CMSG_DATA(PWSACMSGHDR cmsg);
extern PACKAGE unsigned __fastcall WSA_CMSG_SPACE(unsigned length);
extern PACKAGE unsigned __fastcall WSA_CMSG_LEN(unsigned length);

}	/* namespace Idwinsock2 */
using namespace Idwinsock2;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Idwinsock2

