I _need_ help writing an application that fetches files with FTP.
I'm using CW Pro 1. It's a really small app, almost no user interface.
It needs to get a couple of files from a FTP server. I'm looking for the
simplest way to do this. I thought PowerPlant's Internet Classes
would be really simple, almost just call FTPConnection.GetFile().
Well, they are, but the thread stuff confuses me.
Could someone tell me what's wrong with this code, or offer me
a simpler solution to do simple FTP transfers.
I do this in my main, and never get to GetFile. Connect crashes
LThread *mainThread = new UMainThread;
LSimpleThread *theThread = new LSimpleThread(GetFileFromFTP,
void GetFileFromFTP(LThread& inThread, void* arg)
GetApplicationFSSpec(&theFile); // Make file in the same directory as the app
GetIndString(theFile.name, kFileNamesAndPaths, kAllFiles); // Get file name
cout << "Created file\n";
cout << "Created ftp connection\n";
cout << "Connected to ftp.funet.fi\n";
cout << "Received file\n";
cout << "Disconnected\n";
OSErr GetApplicationFSSpec(FSSpec *theFS)Quote:}
Thanks in advance, I'd really appreciate an answer.Quote:}