Busy flag

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

Hello ...

I'm sorry but your approach is wrong. Do not call any further functions in the events.

Regards,
SmartFTP

Well if the approach is wrong, then there is no current way to event-control Smart FTP Library in VB6. You require a multithreaded developertool.

The only way the Async = true would be usefull in VB6 is to have an extra timer to check the status of each connection That approach is even more lame, so what I read between the lines; SmartFTP library does not support multiple connections in VB6.

Honestly you shouldn't even consider to use VB6 to write any kind of applications these days.

Regards,
-Mat

Hehe, I guess your right... But you know, quick & easy. Now I hit the wall, going over to C# or C++ since that is what I usally program.

Edit: Thnx for the help...

Suggestion; Create a shareware/freeware license to even spread your object more. At current prices it is pointed at the enterprise market. It is so good it should be used everywhere!

Thnx Mat for "forcing" me over to C#. I've created a class that event-base the SmartFTP library, and it works much better! I guess this is the way of the future (god bye old VB6 friend).

Now with the new IPC:// handling in .NET 2.0, I can easly create a webinterface for the FTP client running in the back. This will be great!

Just an advice:
I would sincerly buy a license of this library if the price was right; for a shareware / freeware developer.
I've been using several other libraries that have different price-calculations for their product for example: http://www.rocketdivision.com/download_ ... n_sdk.html

Edit: I even got a discount for a donate/freeware from the guys at Starburn, that is what I call service!