I’m transferring a file using ftp in Delphi.
I am able to connect to the ftp account ok but when I try and upload a file the
FtpOpenFile function returns nil instead of a handle the file to be uploaded.
hintfile := FtpOpenFile(hintconnect,PChar(tgtfn),GENERIC_WRITE,FTP_TRANSFER_TYPE_BINARY,0);
If I log into the ftp site using an ftp client application and exactly the same credentials I can upload the file without a problem.
Any suggestions appreciated.
Try to get the last error, documentation says it all:
http://msdn.microsoft.com/en-us/library/aa384166(VS.85).aspx