Login  
Search All Forums
Dart Home | PowerTCP FTP for ActiveX | Custom Development Reply | PowerTCP FTP for ActiveX Topics | Forums   
AuthorForum: PowerTCP FTP for ActiveX
Topic: mPut progress
User877

Posts: 7
Member Since: 02/19/01
posted February 19, 2001 1:44 AM

I've found a way to do my mPut in a blocking way which resolves my issue above. This must mean that mPut doesn't work in non-blocking mode...Anyway my question is how can I display to the user the progress of an mPut. I want to do it in a percent completed fashion. However this requires that I know the total files to be sent. Does mPut provide this or do I have to calculate it myself.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 19, 2001 7:26 AM


I'll answer all three questions here.

MPUT was designed to be a quick way to store a bunch of files. It is usable only in blocking mode. Also, there is no way to display total progress unless you have a means of determining the total size yourself.

Hope this helps!

Tony Priest
Dart Tech Support
User877

Posts: 7
Member Since: 02/19/01
posted February 19, 2001 11:13 AM

Thanks Tony,

I've been able to figure out how to count the total files myself and then
use a counter to display an approximate progress bar. I also check to see
if a user has pressed a stop button and if so then call abort.

I am a little confused about firewalls. The documentation talks about
firewalls and demonstrates a couple of different ways of dealing with them.
Do I need to do this myself or is the control dealing with this behind the
scenes?

Finally I've included the vb routines I'm using to do an mPut. Could you
please check them to see if anything jumps out to you as being potentially
dangerous?

Thanks,

Gray Jones

Public Sub doFTP()
  On Error GoTo OnError

  ftpLastReply = ""
  ftpCount = 0
  totalFTPFiles = Me.countFTPFiles
  Screen.MousePointer = 11
  Call showStatusBox(Me, "Sending Files (FTP)")

  Ftp1.Trace "ftpTrace.txt", True, True, "Sent: ", "Recv: "
  Call Ftp1.Login("sportsjerk.com", "xxxx", "xxxxx")
  Call Ftp1.MPut(App.path & "\html\*", "/familypool")
  Call Ftp1.Logout

  Me.frmStatus.Visible = False
  Screen.MousePointer = 0
  Exit Sub
OnError:
  'Ftp1.Trace
  If Err.number = ptProtocol Then
    appendToFTPTrace "doFTP Put Failed: " + ftpLastReply
  Else
    appendToFTPTrace "doFTP ERROR #" + CStr(Err.number) + ": " +
Err.DESCRIPTION
  End If

  Me.frmStatus.Visible = False
  Screen.MousePointer = 0

End Sub

Private Sub Ftp1_Progress(ByVal FtpCmd As DartFtpCtl.CommandConstants, ByVal
Status As DartFtpCtl.StatusConstants, ByVal Reply As String, ByVal count As
Long, ByVal Size As Long)
  ftpLastReply = Reply
  If Status = ftpOk Then
    Select Case FtpCmd
      Case ftpPassword
      Case ftpStore
        ftpCount = ftpCount + 1
        Call displayStatus(Me, ftpCount / totalFTPFiles)
    End Select

  ElseIf Status = ftpInProgress Then
  ElseIf Status = ftpError Then
    'Ftp1.Trace
    appendToFTPTrace "Ftp1_Progress - Error: " + ftpLastReply + " : " +
Status
  End If

  DoEvents
  If gCancel Then
    'Ftp1.Trace
    appendToFTPTrace "Ftp1_Progress - User Cancelled"
    Ftp1.Abort
  End If

End Sub
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 19, 2001 11:34 AM


The control does not handle firewalls internally. You have to code that yourself (as in the sample)

I am unable to perform code analysis on the forum. We provide this as a service for fee. If that is what you want, please contact sales@dart.com. Otherwise, please take a look at the sample codes that we provide.

Thanks,

Tony
User877

Posts: 7
Member Since: 02/19/01
posted February 19, 2001 11:43 AM

Is the service part of the free 30 day support that comes with the license?

Also which sample code shows how to deal with a firewall?
Thanks
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted February 19, 2001 12:01 PM


No. Code review is done on an hourly basis.

The sample is called ProxyLogin

Tony
Reply | PowerTCP FTP for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX