Metod List in C++Builder 5.0 (Indy10)

Giganews Newsgroups
Subject: Metod List in C++Builder 5.0 (Indy10)
Posted by:  Yura (yu…@kase.kz)
Date: Mon, 16 Jul 2007

#include "IdAllFTPListParsers.hpp"

try {
        IdFTP->Connect();
        IdFTP->DirectoryListing->Clear();
        IdFTP->List();    <----------- raise EIdConnClosedGracefully
}
catch (...) {
        ShowMessage("|"+IdFTP->ListResult->Text+"|");  <------------
IdFTP->ListResult->Text is empty
}

Why this code is not work? I wanna list all files on server. Help me please!

P.S.: I use Indy10 in C++Builder 5

in my dfm-file:
  object IdFTP: TIdFTP
    OnStatus = IdFTPStatus
    AutoLogin = True
    Host = '192.168.111.21'
    Password = 'test'
    TransferType = ftASCII
    ListenTimeout = 0
    Username = 'test'
    UseExtensionDataPort = True
    ProxySettings.ProxyType = fpcmNone
    ProxySettings.Port = 0
    OnCreateFTPList = IdFTPCreateFTPList
    OnRetrievedDir = IdFTPRetrievedDir
    OnDirParseStart = IdFTPDirParseStart
    ReadTimeout = 0
    Left = 756
    Top = 8
  end

Replies