Indy 10 Delphi FTP Client Demo Error

I am new to Delphi and wanted to try breaking down a demo to understand the it's structure.

I am trying to get the Indy 10 Delphi FTP Client demo to run on Delphi XE2.

Whenever I run the downloaded code, I enter the FTP URL, Username, Password etc and when the FTP connects this error appears:

raised exception class $C00000005 with message 'access violation at 0x0018f90e: write of address 0x0000000'

Which I assume it means it's pointing at a null?

The debugging tool simple points at this line..

ChangeFTPDir(Sites[cbFTPAddress.ItemIndex].RootDir);

What would be the best way of removing this error (try/catch) or is there a working sample of a Delphi FTP procedure that I could have a look at?

Thanks for your time in advance,

Sophie

The procedure is as below:

procedure TfrmMain.ChangeFTPDir(NewDir: String);
begin
  FLastDirStack.Add(FTP.RetrieveCurrentDir);
  FTP.ChangeDir(NewDir);
  DisplayFTP;
end;

I assume that the site array does contain details as the ftp does connect to the name of the stored ftp site before the error appears...


Did you use IdAllFTPListParsers ? Try it.

链接地址: http://www.djcxy.com/p/91102.html

上一篇: 德尔福:哪个异常类应该用来引发最后的Win32 / Win64错误?

下一篇: Indy 10 Delphi FTP客户端演示错误