|
-
Jul 28th, 2016, 11:20 AM
#1
Thread Starter
Member
Number of Bytes Only Show First Time Using FTPGETFILE
I have a routine using FTPGETFILE which displays the number of Bytes being downloaded in a listbox. The number of bytes also shows up in a Progressbar and a Picturebox (I'm testing several items). The number of Bytes being downloaded is being retrieved from the MOVEMEMORY API Function. All 3 of these will work correctly and display correctly the first time I download a file, but they don't work when I try to download the same file after the first time. In other words, download 2, 3, 4, etc. of the same file doesn't display the number of bytes. I'm guessing this has something to do with the file being in memory somewhere? I have tried using different flags such as 1.) FILE_ATTRIBUTE_ARCHIVE and 2.) INTERNET_FLAG_RELOAD Or INTERNET_FLAG_NO_CACHE_WRITE but nothing seems to work. Suggestions? Thanks in advance for any help.
-
Jul 28th, 2016, 02:04 PM
#2
Re: Number of Bytes Only Show First Time Using FTPGETFILE
Would really need to see the exact problem in code to offer an accurate solution. And is it saying it downloaded 0 bytes, or just an incorrect number of bytes? Is there maybe a resource/handle not being freed at the end of the function?
-
Aug 9th, 2016, 12:16 PM
#3
Thread Starter
Member
Re: Number of Bytes Only Show First Time Using FTPGETFILE
Not sure. The code is intertwined with other things (for various reasons) that it would be hard to post. I am still looking for a solution. I don't understand why MoveMemory seems to work fine for Downloading but not Uploading as far as extracting the Bytes that are being move.
-
Aug 12th, 2016, 01:20 PM
#4
Re: Number of Bytes Only Show First Time Using FTPGETFILE
To try to estimate the problem, you can post lines with key functions only, like FtpGetFile / HttpOpenRequest / maybe callback routine + declarations of functions and used constants.
work fine for Downloading but not Uploading as far as extracting the Bytes that are being move.
Not quite understandable, if the problem occurs during downloading (FtpGetFile) or in some other function for uploading ...
Tags for this Thread
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
|