Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving list of available disk drives
Simulating DOEVENTS
Using mailslots to send messages on the network
Using named pipes for interprocess communication
Accessing examples contained in this reference through Web Services
Disk in drive A:
Enumerating print processors and supporting data types installed on the specified server
How to enumerate terminal servers within the specified Windows domain
How to hot-track menu item selection in top-level form (requires VFP9)
How to view system icons for the classes installed on the local machine
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Reading VFP settings from the Windows Registry
Tracking mouse movement to detect when to start dragging
Using GetNearestColor
Winsock: how to retrieve a service information corresponding to a service name
CryptoAPI: retrieving list of providers
GDI+: Color Transparency
GDI+: Drawing a Pie Chart
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
Reading and setting system access privileges for the current process
Testing if a connection to an Url can be established
Using FtpCommand
Using vendor-neutral SQL constructs
Verifying a file using the Authenticode policy provider
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: 103  
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 (50.16.108.167)
4 sec.Example: 'Quering a waveform-audio input device'
7 sec.Function: 'getnameinfo'
Function group: 'Windows Sockets 2 (Winsock)'
27.52 min.Function: 'PathYetAnotherMakeUniqueName'
33.6 min.Function: 'CeGetSystemPowerStatusEx'
Function group: 'Remote Application Programming (RAPI)'
33.65 min.Example: 'How to change the name and the size of the font in the MessageBox dialog'
1.02 hrs.Example: 'How to make the caption of a VFP application flashing in the Windows task bar'
1.79 hrs.Example: 'Pocket PC: base class'
 Function: 'waveInUnprepareHeader'
Function group: 'Windows Multimedia'
4.06 hrs.Function: 'GetSystemWow64Directory'
 Function: 'WSAStartup'
Google
Advertise here!