Indy 10 for D4

Giganews Newsgroups
Subject: Indy 10 for D4
Posted by:  bernd hötzel (bernd.hoetzel6753…@arcormail.de)
Date: Wed, 31 Aug 2005

Hello,
When I have tried to install Indy 10.0.52 on D4, I had to change many parts
of the source before it really works,
because some functions from newer versions are there often used.
When you are interested in the changes, you can find a change log at the end
of this post, or you can
download the changed component from
home.arcor.de/BeniBela/indy10.0.52_source.zip.
I also have fixed the FTP example (the source was okay, but D4 couldn't read
the forms):
home.arcor.de/BeniBela/Indy_10_FTPClient.zip

Sorry for my bad English, but it is not my native language.
Benito

###############################################ChangeLog####################
#########################
Attention: Every FreeAndNil(x) was replaced through FreeAndNil(tobject(x))
even if this is not listed.
============================================================================
============
indysystem40.dpk:28 (requires)
  //rtl =>
  vcl40

idglobal:no matter where (before implementation)
  //eingefügt:
  {$IFDEF VER120}
    procedure FreeAndNil(var obj:TObject);
  {$ENDIF}

:no matter where (after implementation)
  //eingefügt:
  {$IFDEF VER120}
    procedure FreeAndNil(var obj:TObject);
    begin
      obj.free;obj:=nil;
    end;
  {$ENDIF}

idstackbsdbase.pas:285(TIdStackBSDBase, public-section)
  //inserted: (because the methode is hidden otherwise)
  procedure SetSocketOption(ASocket: TIdStackSocketHandle;
ALevel:TIdSocketOptionLevel;
            AOptName: TIdSocketOption; AOptVal: Integer);
overload;override;abstract;

idStackWIndows.pas:237(TIDStackWindows, public-section)
  //overload inserted
    function HostToNetwork(AValue: Word): Word; overload;override;
    function HostToNetwork(AValue: LongWord): LongWord; overload; override;
    function HostToNetwork(AValue: Int64): Int64; overload;override;
    procedure Listen(ASocket: TIdStackSocketHandle; ABackLog: Integer);
              override;
    function NetworkToHost(AValue: Word): Word; overload;override;
    function NetworkToHost(AValue: LongWord): LongWord; overload;override;
    function NetworkToHost(AValue: Int64): Int64; overload;override;

============================================================================
============
indycore40.dpk:28 (requires)
  //rtl =>
  vcl40

============================================================================
============
indycore40.dpk:28 (requires)
  //rtl =>
  vcl40

============================================================================
============
dclindycore40.dpk:28 (requires)
  //designide =>
  {!-- deleted --}

============================================================================
============
IndyProtocols40.dpk:28 (requires)
  //rtl =>
  vcl40,vclx40

idglobalprotocols.pas:355 (uses)
  //inserted (damit DirectoryExists benutzt werden kann)
  {$IFDEF VER120}
  ,FileCtrl
  {$ENDIF};

IdFTPListParseBase:514(TIdFTPLPMList.ParseLine)
  //FreeAndNil(LFacts); =>
  LFacts.free;

IdFTPListParseBase:604(finalization)
  //FreeAndNil(GParserList); =>
  GParserList.free;
  GParserList:=nil;

IdDigestAuthentication:171(TIdDigestAuthentication.DoNext)
  //if not SameText(FAlgorithm, 'MD5') then begin =>
  if upperCase(FAlgorithm)<>'MD5' then begin

idDictCommon:170(TIdDefinition.Destroy)
  //FreeAndNil(tobject(FDB));  FreeAndNil(tobject(FDefinition)); =>
  FDB.free;
  FDB:=nil;
  FDefinition.free;
  FDefinition:=nil;

IdSASLEntries:241(TIdSASLEntries.RemoveByComp)
  //Delete(i); =>
  Items[i].free;

idFTPListOutput:(TIdFTPListOutput.InternelOutputDir - ProcessPathComma)
  //AOutput.Text := AOutput.Text + WrapText(LTmp);
  AOutput.Text := AOutput.Text + WrapText(LTmp,#13#10,['.',' ',#9,'-'],45);

IdIMAP4Server:643(TIdIMAP4Server.ExpungeRecords)
  //TIdIMAP4PeerContext(ASender.Context).FMailBox.MessageList.Delete(LN); =>
  TIdIMAP4PeerContext(ASender.Context).FMailBox.MessageList[LN].free;

idIRC:541(TIdIRC.Disconnect)
  //inherited Disconnect();
  inherited Disconnect(areason='');

idMessageCoderYenc:155(TIdMessageDecoderInfoYenc.CheckForStart)
  //if AnsiSameText( Copy( ALine, 1, 8 ) , '=ybegin ' ) {Do not Localize}
then =>
  if lowercase(Copy( ALine, 1, 8 )) = '=ybegin ' then =>

IdTrivialFTP:106(TIdTrivialFTP.CheckOptionAck(const optionpacket: string);)
  //if SameText(LOptName, 'blksize') then begin
  if lowercase(LOptName) = 'blksize' then begin

============================================================================
============
dclIndyProtocols40.dpk:28 (requires)
  //IndyProtocols40;
  //IndySystem40;
  //IndyCore40;
  //dclIndyCore40; =>
  IndyProtocols40,
  IndySystem40,
  IndyCore40,
  dclIndyCore40;

IdDsnSASLListEditorForm:513(TfrmSASLListEditor.actRemoveExecute)
  //SASLList.Delete(sel); =>
  SASLList[sel].free;

IdDsnSASLListEditor:140(TIdPropEdSASL.Edit)
  //FreeAndNil(tobject(LF)); =>
  LF.free

Replies