Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Using InternetSetFilePointer when resuming interrupted download from the Internet
GDI+: rotating images using matrix transformations
How to block the PrintScreen key
How to generate UUID values
Retrieving statistics for the TCP protocol running on the local computer
Running a regular FoxPro form while main VFP window is minimized
Accessing examples contained in this reference from a VFP application
Adding an ODBC data source with the SQLConfigDataSource; use automatic or interactive mode
Disconnecting USB Mass Storage Device programmatically
How to extract frames from AVI files
How to suspend or hibernate your system
Setting the date and time that a file was created
Using IsChild() for testing ThisForm.ShowWindow property
Configuring DEVMODE structure for a printer
Creating a clipping region from the path selected into the device context of a form
Disabling drawing in the VFP form
Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)
Encapsulating access to the Windows Services in a class
Exporting DLL icon resources as .ICO files
Obtaining MAC address through Address Resolution Protocol (ARP) request
Reading security permissions for NTFS files and folders
Retrieving the names of all sections in an initialization file
Using custom Simple MapiSendMail class
Using Extended MessageBox() Class
Using InternetSetFilePointer when resuming interrupted download from the Internet

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
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 name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
4232 bytes  
Created: 2001-11-13 19:11:14  
Modified: 2011-12-10 09:20:22  
Visits in 7 days: 104  
Listed functions:
CloseHandle
CreateFile
GetFileSize
InternetCloseHandle
InternetOpen
InternetOpenUrl
InternetReadFile
InternetSetFilePointer
OpenFile
SetFilePointer
WriteFile
Printer friendly API declarations
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (107.20.7.65)
3 sec.Function: 'CreateEllipticRgn'
6 sec.Example: 'Browsing Windows Known Folders (Special Folders)'
1.62 hrs.Function: 'mixerOpen'
3.64 hrs.Example: 'CryptoAPI: retrieving list of providers'
 Function: 'GdipDisposeImage'
Function group: 'GDI+ Image'
 Function: 'SQLInstallerError'
Function group: 'ODBC API'
5.77 hrs.Example: 'How to copy the image of a form to the Clipboard using Bitmap API functions'
 Function: 'SHCreateDirectory'
Function group: 'Shell Functions'
 Example: 'How to make a VFP form fading out when released (GDI version)'
7.99 hrs.Example: 'How to display a user-defined icon in the MessageBox dialog'
Google
Advertise here!