 |
| Using InternetSetFilePointer when resuming interrupted download from the Internet |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
The remote source file, presented in this example, is large enough -- 3 465 231 bytes.
When running this code try to interrupt it completely by pushing the Esc key, and starting the program again one or more times to complete the download. Clear memory or even quit VFP between the calls. |
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 4232 bytes Created: 2001-11-13 19:11:14 Modified: 2011-12-10 09:20:22 Visits in 7 days: 109 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
If the target local file is found, the program opens the source remote file and sets its pointer equally to the local file size. The local pointer is set to EOF position.
The InternetSetFilePointer parameters include pReserved parameters, which MSDN suggests to set to zero. After comparing interfaces of InternetSetFilePointer and SetFilePointer it is quite logical to say that this parameter is similar to the lpDistanceToMoveHigh (high DWORD).
The simplest way to check this assumption is to download in N-steps a remote file larger than 0xffffffff (4,294,967,295) bytes -- 4 Gb. And at least one interruption should be made after the critical DWORD length offset. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|