|
-
April 1st, 1999, 06:17 PM
#1
FTP through Wininet.dll with progress shown
Hi.
Does anybody know how to use the wininet.dll though api to connect to a server, and download a file with progress showing?
i've gotten the Connecting and downloading to work so far, but i'm stuck at the showing progress.
Any help would be appreciated
Thank you
Sang
-
April 3rd, 1999, 01:36 AM
#2
Re: FTP through Wininet.dll with progress shown
Hi,
Try the Inet Ocx instead. I think, the same wininet.dll is packed into a ocx for VB users. Select the 'Microsoft Internet Transfer Control' (MSINET.ocx). [Project-Controls] menu.
This ocx supports GetChunk method using which you can get chunks of data and
as each chunk is succesfully recieved, you can update a progress bar.
Ravi
ps; Please refer to MSDN for exact usage. I think you have to use .Execute with "Open" or something..
-
April 5th, 1999, 10:27 AM
#3
Re: FTP through Wininet.dll with progress shown
I believe you can use GetRemoteFileSize() from the Wininet API to get the file size. Then use the function that tells you the bytes available to read. Then before you actually read the bytes use the GetTickCount() API function. Then perform the read function, and when the bytes are read use the GetTickCount() again. Then divide the bytes read by the milliseconds elasped(subtract the tick counts) to get kps. You perform this in a loop until the entire file is read.
Gordito Supreme
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|