Jump to content


Photo

Busy flag


  • Please log in to reply
6 replies to this topic

#1 large

large
  • Members
  • 6 posts

Posted 17 July 2007 - 11:15 PM

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

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 18 July 2007 - 02:11 PM

Hello ...

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

Regards,
SmartFTP

#3 large

large
  • Members
  • 6 posts

Posted 18 July 2007 - 02:16 PM

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.

#4 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 18 July 2007 - 02:19 PM

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

Regards,
-Mat

#5 large

large
  • Members
  • 6 posts

Posted 18 July 2007 - 03:03 PM

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! <_<

Edited by large, 18 July 2007 - 03:05 PM.


#6 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 18 July 2007 - 03:18 PM

Hello ..

You may want to look at VB.NET. You can find samples for VB.NET and C# in the FTPLib Samples folder.

VB6 to VB.NET Upgrade Resources
http://forums.micros.......43&SiteID=1

I hope this helps.

Regards,
-Mat

#7 large

large
  • Members
  • 6 posts

Posted 19 July 2007 - 09:09 AM

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.rocketdiv...arburn_sdk.html

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

Edited by large, 19 July 2007 - 09:10 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users