Problem using GetChunk to track progress of FTP GET w/Internet Transfer Control 
Author Message
 Problem using GetChunk to track progress of FTP GET w/Internet Transfer Control

I am writing an application that uses the Internet Transfer Control to
move some rather large files across the Internet, so I want to include
progress information based on the number of bytes transferred.  I have
been trying to work this out by placing logic using the GetChunk
statement when the state code is icResponseReceived, but I get an error
35764 (Still executing last request) on the first GetChunk statement.
The transfer is invoked by a statement using the Inet1.Execute with a
GET command.  Any help you can render would be appreciated.  The segment
of code handling the icResponseReceived state change is as follows:

Private Sub Inet_StateChanged(ByVal State As Integer)
  Select Case State
    [Case statements omitted]
    Case icResponseReceived
      sbFTP.Panels("status").Text = "Response Received"
      If FTPCmd = "GET" Then
        DataFromBuffer = Inet.GetChunk(1024, icByteArray)
        DoEvents
        If Len(DataFromBuffer) = 0 Then
          Exit Sub
        End If
        Do While Not NoDataInBuffer
          BytesTransferred = BytesTransferred + Len(DataFromBuffer)
          sbFTP.Panels("progress").Text = Str(BytesTransferred)
          DataFromBuffer = Inet1.GetChunk(1024, icByteArray)
          DoEvents
          If Len(DataFromBuffer) = 0 Then
            Exit Sub
          End If
          Print #OutFNum, DataFromBuffer;
        Loop
      End If
    [Additional Case statements omitted]
  End Select
End Sub
=============================================
William E. Buntain
C&C Software



Sun, 13 Jul 2003 13:13:09 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. internet transfer control ftp, size and getchunk

2. Using the Internet Transfer control and StillExecuting property with Progress Bar

3. Download Progress using Internet Transfer Control - thanks!

4. Download Progress using Internet Transfer Control - thanks!

5. Getting Progress of FTP Transfer

6. FTP status using internet transfer control

7. Failing FTP to MVS system using Internet Transfer Control

8. Failing FTP to MVS system using Internet Transfer Control

9. Using the internet transfer control for ftp...

10. FTP using Internet Transfer Control

11. ftp appication using the Internet transfer control

12. Failing FTP to MVS system using Internet Transfer Control

 

 
Powered by phpBB® Forum Software