Messages being lost
Posted 05 January 2006 - 02:39 PM
Could it be that the ftp library is handling the messages and maybe we use message id's in the same range?
Posted 05 January 2006 - 03:11 PM
You may want to try to set the UseMessageLoop property of the FTPConnectionMTA class to VARIANT_TRUE (default for FTPConnectionMTA is VARIANT_FALSE). But we recommend to use a separate thread for FTP operations.
The basic scheme would look like this:
CMainThread : public CWinThread
- Creates CFTPThread on Init
- Sends a thread message to the CFTPThread whenever a FTP function should be performed
CFTPThread : public CWinThread
- Calls FTP function e.g. FTPConnectionMTA->Connect().
During this operation the thread messages sent to CFTPThread are queued and executed after the execution of the previous thread message has been completed.
- To abort a FTP operation, call the FTPConnectionMTA->Abort() function directly from the CMainThread.
Remark: In this case the UseMessageLoop property doesn't need to be set to VARIANT_TRUE.
I hope this gives you an idea how to implement it. If not I will try to find some time to extract the relevant code from the SmartFTP Client.
Posted 06 January 2006 - 11:25 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users