large
Hi
I'm currently developing a VB6 util that creates an array of FTPConnectionSTA objects, all in Async = true.
The class works liks this:
Init: Create FTPConnectionSTA object (with all info needed)
Connect()
OnConnect(): Checks the lasterror, call ChangeDir
OnChangeDir: Checks the last error, calls ReadDirectory()
OnReadDirectory(): checks the last error, if ok set bDlOK = True
Now I know that it is a big no, no to call functions in the events, but it did work.
The reason for why I said; did is this: The version 1.5.7 (that I used earlier) worked with the approced above. But failed on a inherited error on the sfFTPLib.FTPFXP object. Therefore I wanted to upgrade, so I downloaded the v1.5.9.26.
Now the sfFTPLib.FTPFXP object error is gone. But now the Busy flag is always set to True in all events. Meaning that I haven't got a method or function that that I can act on, without user interaction. Every command fail with ftpErrorBusy error.
I guess that this is a quick "hack", but I've done this with many other objects. The applications works, because I carfullly checks the feedback before calling new functions, avoiding deadlocks.
Any suggestions on how to accive this in VB6 is appriciated, cheers
I'm currently developing a VB6 util that creates an array of FTPConnectionSTA objects, all in Async = true.
The class works liks this:
Init: Create FTPConnectionSTA object (with all info needed)
Connect()
OnConnect(): Checks the lasterror, call ChangeDir
OnChangeDir: Checks the last error, calls ReadDirectory()
OnReadDirectory(): checks the last error, if ok set bDlOK = True
Now I know that it is a big no, no to call functions in the events, but it did work.
The reason for why I said; did is this: The version 1.5.7 (that I used earlier) worked with the approced above. But failed on a inherited error on the sfFTPLib.FTPFXP object. Therefore I wanted to upgrade, so I downloaded the v1.5.9.26.
Now the sfFTPLib.FTPFXP object error is gone. But now the Busy flag is always set to True in all events. Meaning that I haven't got a method or function that that I can act on, without user interaction. Every command fail with ftpErrorBusy error.
I guess that this is a quick "hack", but I've done this with many other objects. The applications works, because I carfullly checks the feedback before calling new functions, avoiding deadlocks.
Any suggestions on how to accive this in VB6 is appriciated, cheers