Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Finding out if the current user is the Guest account
How to display advanced Task Dialog (Vista)
Locking and unlocking file of a VFP table
Simple MAPI: how to pick an email recipient from Outlook Express address book
Winsock: creating a socket that is bound to a specific service provider
CryptoAPI: Collection of Providers class
Enumerating sessions established on a server
How to create a desktop shortcut (shell link)
How to generate GUID values
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
How to run FoxPro application under different user name (impersonating user)
Retrieving IP statistics for the computer
System and Local Time values
Converting twips to pixels and vice versa
GDI+: Creating thumbnails to preview images in a directory
How to display the port-configuration dialog box for a port on the specified server
Passing data records between VFP applications via the Clipboard
Quering a waveform-audio input device
Reading data from INI files
Winsock: how to retrieve the protocol information corresponding to a protocol name
How to block the ALT+TAB shortcut (WinXP)
Pocket PC: custom RAPI class for operating with the Object Store Databases
PocketPC: custom RAPI class for executing routines on remote Windows CE device
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
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: 109  
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.73.7.143)
3 sec.Function: 'GetMenuItemCount'
6 sec.Function: 'CeRapiInit'
Function group: 'Remote Application Programming (RAPI)'
1.06 hrs.Example: 'Closing Windows'
1.5 hrs.Function: 'SetClipboardViewer'
Function group: 'Clipboard'
3.52 hrs.Example: 'GDI+: Creating thumbnails to preview images in a directory'
 Function: 'GdipRotateMatrix'
4.08 hrs.
 Example: 'Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)'
5.32 hrs.Function: 'GetLongPathName'
Function group: 'File Management'
 Gallery
Page 17
Google
Advertise here!