Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to obtain the number of rows affected by remote UPDATE, INSERT or DELETE statement
How to retrieve information about a cache entry (Internet Explorer)
Pocket PC: Folder Viewer
Retrieving the state of your Internet connection
Scanning a hierarchy of child windows down from the Windows Desktop
Scanning the hierarchy of child windows down from the main VFP window
Creating a mailslot
GDI+: Creating thumbnails to preview images in a directory
How to run FoxPro application under different user name (impersonating user)
Using GetSysColor
Using vendor-neutral SQL constructs
Winsock: resolving an address to a host name
A class that encrypts and decrypts files using Cryptography API Functions
Comparing file times
Enumerating ODBC drivers available on the local computer
How to display advanced Task Dialog (Vista)
Opening the Page Setup dialog box to specify the attributes of a printed page
Reading STARTUPINFO structure for the current VFP session
Using an Event Object. Part A: running an application that creates an Event object
Winsock: retrieving information about available transport protocols
Converting an integer value to a hexadecimal string
Displaying the associated icons and descriptions for files and folders
Enumerating Processes -- WinNT
Printing text on the client area of the main VFP window
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: 114  
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 (184.72.184.104)
4 sec.Example: 'A class that encrypts and decrypts files using Cryptography API Functions'
3.5 hrs.Function: 'CeRegQueryValueEx'
 Example: 'Displaying bitmap using the AlphaBlend function'
 Example: 'How to assemble an array of strings and pass it to external function'
15.71 hrs.Example: 'Retrieving information about the main VFP window'
17.1 hrs.Function: 'RegCloseKey'
Function group: 'Registry'
 
Function group: 'Windows Sockets 2 (Winsock)'
19.07 hrs.Example: 'Enumerating Processes -- Win9*'
 Function: 'RegQueryValueEx'
Function group: 'Registry'
22.71 hrs.Example: 'How to drag a Form not using its Titlebar or Caption'
Google
Advertise here!