08-26-2018, 06:55 PM
Here is what I found in Indy_9_00_18_src
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence }
{ Team Coherence is Copyright 2002 by Quality Software Components }
{ }
{ For further information / comments, visit our WEB site at }
{ http://www.TeamCoherence.com }
{**********************************************************************}
{}
{ $Log: 10425: IdWinSock2.pas
{
{ Rev 1.2 4/20/03 1:54:08 PM RLebeau
{ Updated to better support C++Builder by adding $EXTERNSYM defines to most of
{ the interface declarations, so that they won't be included in the
{ auto-generated HPP file. The native winsock2.h header file is used instead.
{
{ Updated with more of the latest WinSock2 defines and declarations.
}
{
{ Rev 1.1 3/22/2003 09:55:58 PM JPMugaas
{ Commented out definition for TGUID. It is not needed because that is in D4,
{ D5, D6, and D7. It could cause conflicts with other code.
{ Fixed bug where a space would cause the WSACreateEvent not to load.
}
{
{ Rev 1.0 2002.11.12 11:00:26 PM czhower
}
//-------------------------------------------------------------
//
// Borland Delphi Runtime Library
// <API> interface unit
//
// Portions created by Microsoft are
// Copyright © 1995-1999 Microsoft Corporation.
// All Rights Reserved.
//
// The original file is: Winsock2.h from CBuilder5 distribution.
// The original Pascal code is: winsock2.pas, released 03 Mar 2001.
// The initial developer of the Pascal code is Alex Konshin
// (alexk@mtgroup.ru).
//-------------------------------------------------------------
{ Winsock2.h -- definitions to be used with the WinSock 2 DLL and WinSock 2 applications.
This header file corresponds to version 2.2.x of the WinSock API specification.
This file includes parts which are Copyright © 1982-1986 Regents
of the University of California. All rights reserved.
The Berkeley Software License Agreement specifies the terms and
conditions for redistribution. }
// Note that the original unit is copyrighted by the original author and I did obtain his
// permission to port and use this as part of Indy - J. Peter Mugaas
// 2002-01-28 - Hadi Hariri. Fixes for C++ Builder. Thanks to Chuck Smith.
// 2001 - Oct -25 J. Peter Mugaas
// Made adjustments for Indy usage by
// 1) including removing Trace logging
// 2) renaming and consolidating some .INC files as appropriate
// 3) modifying the unit to follow Indy conventions
// 4) Adding TransmitFile support for the HTTP Server
// 5) Removing all static loading code that was IFDEF'ed. {Do not Localize}
// 2001 - Mar - 1 Alex Konshin
// Revision 3
// converted by Alex Konshin, mailto:alexk@mtgroup.ru
// revision 3, March,1 2001
unit IdWinSock2;
interface
{$ALIGN OFF}
{$RANGECHECKS OFF}
{$WRITEABLECONST OFF}
uses SysUtils, Windows, IdException;
type
EIdWS2StubError = class(EIdException)
protected
FWin32Error : DWORD;
FWin32ErrorMessage : String;
FTitle : String;
public
constructor Build( const ATitle : String; AWin32Error : DWORD );
property Win32Error : DWORD read FWin32Error;
property Win32ErrorMessage : String read FWin32ErrorMessage;
property Title : String read FTitle;
end;
{$DEFINE WS2_DLL_FUNC_VARS}
{$DEFINE INCL_WINSOCK_API_PROTOTYPES}
{$DEFINE INCL_WINSOCK_API_TYPEDEFS}
// Define the current Winsock version. To build an earlier Winsock version
// application redefine this value prior to including Winsock2.h
const
{$EXTERNALSYM WINSOCK_VERSION}
WINSOCK_VERSION = $0202;
WINSOCK2_DLL = 'WS2_32.DLL'; {Do not Localize}
type
{$EXTERNALSYM u_char}
u_char = Byte;
{$EXTERNALSYM u_short}
u_short = Word;
{$EXTERNALSYM u_int}
//u_int = DWORD;
u_int = Integer;
{$EXTERNALSYM u_long}
u_long = DWORD;
// The new type to be used in all instances which refer to sockets.
{$EXTERNALSYM TSocket}
TSocket = u_int;
{$EXTERNALSYM WSAEVENT}
WSAEVENT = THandle;
PWSAEVENT = ^WSAEVENT;
{$EXTERNALSYM LPWSAEVENT}
LPWSAEVENT = PWSAEVENT;
{$IFDEF UNICODE}
PMBChar = PWideChar;
{$ELSE}
PMBChar = PChar;
{$ENDIF}
const
{$EXTERNALSYM FD_SETSIZE}
FD_SETSIZE = 64;
Suggestion?
{ $HDR$}
{**********************************************************************}
{ Unit archived using Team Coherence }
{ Team Coherence is Copyright 2002 by Quality Software Components }
{ }
{ For further information / comments, visit our WEB site at }
{ http://www.TeamCoherence.com }
{**********************************************************************}
{}
{ $Log: 10425: IdWinSock2.pas
{
{ Rev 1.2 4/20/03 1:54:08 PM RLebeau
{ Updated to better support C++Builder by adding $EXTERNSYM defines to most of
{ the interface declarations, so that they won't be included in the
{ auto-generated HPP file. The native winsock2.h header file is used instead.
{
{ Updated with more of the latest WinSock2 defines and declarations.
}
{
{ Rev 1.1 3/22/2003 09:55:58 PM JPMugaas
{ Commented out definition for TGUID. It is not needed because that is in D4,
{ D5, D6, and D7. It could cause conflicts with other code.
{ Fixed bug where a space would cause the WSACreateEvent not to load.
}
{
{ Rev 1.0 2002.11.12 11:00:26 PM czhower
}
//-------------------------------------------------------------
//
// Borland Delphi Runtime Library
// <API> interface unit
//
// Portions created by Microsoft are
// Copyright © 1995-1999 Microsoft Corporation.
// All Rights Reserved.
//
// The original file is: Winsock2.h from CBuilder5 distribution.
// The original Pascal code is: winsock2.pas, released 03 Mar 2001.
// The initial developer of the Pascal code is Alex Konshin
// (alexk@mtgroup.ru).
//-------------------------------------------------------------
{ Winsock2.h -- definitions to be used with the WinSock 2 DLL and WinSock 2 applications.
This header file corresponds to version 2.2.x of the WinSock API specification.
This file includes parts which are Copyright © 1982-1986 Regents
of the University of California. All rights reserved.
The Berkeley Software License Agreement specifies the terms and
conditions for redistribution. }
// Note that the original unit is copyrighted by the original author and I did obtain his
// permission to port and use this as part of Indy - J. Peter Mugaas
// 2002-01-28 - Hadi Hariri. Fixes for C++ Builder. Thanks to Chuck Smith.
// 2001 - Oct -25 J. Peter Mugaas
// Made adjustments for Indy usage by
// 1) including removing Trace logging
// 2) renaming and consolidating some .INC files as appropriate
// 3) modifying the unit to follow Indy conventions
// 4) Adding TransmitFile support for the HTTP Server
// 5) Removing all static loading code that was IFDEF'ed. {Do not Localize}
// 2001 - Mar - 1 Alex Konshin
// Revision 3
// converted by Alex Konshin, mailto:alexk@mtgroup.ru
// revision 3, March,1 2001
unit IdWinSock2;
interface
{$ALIGN OFF}
{$RANGECHECKS OFF}
{$WRITEABLECONST OFF}
uses SysUtils, Windows, IdException;
type
EIdWS2StubError = class(EIdException)
protected
FWin32Error : DWORD;
FWin32ErrorMessage : String;
FTitle : String;
public
constructor Build( const ATitle : String; AWin32Error : DWORD );
property Win32Error : DWORD read FWin32Error;
property Win32ErrorMessage : String read FWin32ErrorMessage;
property Title : String read FTitle;
end;
{$DEFINE WS2_DLL_FUNC_VARS}
{$DEFINE INCL_WINSOCK_API_PROTOTYPES}
{$DEFINE INCL_WINSOCK_API_TYPEDEFS}
// Define the current Winsock version. To build an earlier Winsock version
// application redefine this value prior to including Winsock2.h
const
{$EXTERNALSYM WINSOCK_VERSION}
WINSOCK_VERSION = $0202;
WINSOCK2_DLL = 'WS2_32.DLL'; {Do not Localize}
type
{$EXTERNALSYM u_char}
u_char = Byte;
{$EXTERNALSYM u_short}
u_short = Word;
{$EXTERNALSYM u_int}
//u_int = DWORD;
u_int = Integer;
{$EXTERNALSYM u_long}
u_long = DWORD;
// The new type to be used in all instances which refer to sockets.
{$EXTERNALSYM TSocket}
TSocket = u_int;
{$EXTERNALSYM WSAEVENT}
WSAEVENT = THandle;
PWSAEVENT = ^WSAEVENT;
{$EXTERNALSYM LPWSAEVENT}
LPWSAEVENT = PWSAEVENT;
{$IFDEF UNICODE}
PMBChar = PWideChar;
{$ELSE}
PMBChar = PChar;
{$ENDIF}
const
{$EXTERNALSYM FD_SETSIZE}
FD_SETSIZE = 64;
Suggestion?