Using Win32 functions in Visual FoxPro Image Gallery
Handle and Object
Code examples:
Comparing file times
Copying files as a transacted operation (Vista)
Creating a console window for Visual FoxPro application
Creating a file, then moving it to another destination
Creating a mailslot
Enumerating Processes -- Win9*
Enumerating Processes -- WinNT
How to check whether the system is 32-bit or 64-bit
How to convert a bitmap file to monochrome format (1 bpp)
How to enable the SE_SHUTDOWN_NAME privilege for the application
How to find when the application started
How to load a user profile
How to make application automatically close all documents it opened
How to prevent users from accessing the Windows Desktop and from switching to other applications
How to run FoxPro application under different user name (impersonating user)
How to set Creation Date/Time for a folder (WinNT)
How to Start a Process as Another User (NT/XP/2K)
How to suspend or hibernate your system
HOWTO: Use the Win32 API to Access File Dates and Times
Locking and unlocking file of a VFP table
Monitoring changes occurring within a directory
Moving shortcut to a specified position on the Windows Desktop
Obtaining I/O counts for the current process
Obtaining names and positions for shortcuts located on the Windows Desktop
Obtaining physical parameters for a drive: sectors, clusters, cylinders...
Passing data records between VFP applications via the Clipboard
Peer-to-peer LAN messenger built with Mailslot API functions
Reading and setting system access privileges for the current process
Reading and setting the priority class values for the current process and thread
Retrieving file information for the VFP executable running
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Setting the date and time that a file was created
Starting external program from VFP and waiting for its termination
Storing content of the Clipboard to a bitmap file
Storing screen shot of a form to bitmap file
Subclassing CommandButton control to create BackColor property
Terminating all running applications from a VFP program
Testing serial ports
Using File Mapping for enumerating files opened by Visual FoxPro
Using GetFileSize
Using InternetSetFilePointer when resuming interrupted download from the Internet
Using mailslots to send messages on the network
Using named pipes for interprocess communication
Using shared memory to exchange data between applications (processes)
Using the CreateFile
Using the DeleteFile
Using the Semaphore object
Using the Semaphore object to allow only one instance of VFP application running
Vertical Label control
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 -- 3465231 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:
  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: 194  
Listed functions:
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 offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
2 sec.Function: 'WSASend'
4 sec.Function: 'ReadFile'
Function group: 'File Management'
6 sec.Function: 'AVIFileOpen'
8 sec.
Function group: 'GDI+ Text'
10 sec.Function: 'GetBinaryType'
13 sec.Function: 'CreateDesktop'
15 sec.
Function group: 'Keyboard Input'
18 sec.Function: 'SQLFetch'
21 sec.Function: 'GdipCreateBitmapFromHBITMAP'
23 sec.Function: 'TerminateProcess'
Advertise here!