Jump to content


Photo

Using the Transfer Queue dll


  • Please log in to reply
3 replies to this topic

#1 D0JpgDlc

D0JpgDlc
  • Members
  • 10 posts

Posted 15 June 2009 - 05:50 PM

I am experimenting with the transfer queue dll (sfTransferQueue.dll) I have some transfers in the queue that I want to run based on an external trigger. I've got the queue loaded to a TransferQueue class. I've got a TransferQueueStorage Class loaded. I am iterating through it to compare the transfer I want to run. I found the item I want to run. The 64K question is how do I run it?? I've been at this all day. It can't be that hard!

Here is the code:
[codebox]
Option Explicit
Dim TQ As sfTransferQueue.TransferQueue
Dim TQI As sfTransferQueue.TransferQueueitem
Dim TQIS As sfTransferQueue.TransferQueueItems
Dim TQS As sfTransferQueue.TransferQueueStorage

Private Sub cmdDoIt_Click()
Dim worked As Boolean
Dim FileLocation As String
FileLocation = "C:\Documents and Settings\P50340\Application Data\SmartFTP\Client 2.0\Transfer Queue.xml"
Set TQ = New sfTransferQueue.TransferQueue
worked = TQ.Load(FileLocation)

Set TQS = TQ.Items

For Each TQI In TQS
MsgBox (TQI.IdAsString)
' TQI.??????????????????????? What make the transfer run???

Next

End Sub[/codebox]

I appreciate any help anyone can give and thanks in advance.

#2 mb

mb

    Developer

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

Posted 15 June 2009 - 06:51 PM

I believe there is a sample in the SDK: http://www.smartftp....showtopic=13484

Call the Transferqueue->Start method. The call is asynchronous. You have to add a loop which waits for the transfer queue completion.

Regards,
Mat

#3 D0JpgDlc

D0JpgDlc
  • Members
  • 10 posts

Posted 24 June 2009 - 03:12 PM

This seems to start the trasnfer queue itself, although it doesn't appear to on my test machine. In any case I am back to my original question.
Is there a way to make one item in the transfer queue run on comand. Lets say I have 5 transfers setup. Lets also say I figure out a way to identify the one I want while iterating through the TQS collection. What method of TQI makes the transfer run? My goal is to setup all my transfers in the transfer queue and write a program to process one item in the queue based on an external factors. When I right click on a trasfer item in the queue it says process. I want that same ability programatically.

Edited by D0JpgDlc, 24 June 2009 - 03:15 PM.


#4 mb

mb

    Developer

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

Posted 24 June 2009 - 06:35 PM

Hello
Yes that's technically possible. Unfortunately we are not able to provide any technical support related to the SDK. It is provided "AS-IS".

Regards,
Mat




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users