Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Managing Cookies
Retrieving information specific to the current Time Zone
StrDup returns a pointer to the duplicate of a source VFP string
Obtaining the System and Windows folder names
Retrieving the names of all sections in an initialization file
Using SQLBrowseConnect to connect to a data source through a number of iterative calls (SQL Server)
How to delete file on FTP server
MSMQ: how to open a queue
Retrieving list of Global Atom names
Closing Windows
Finding the path to the VFP executable running
How to hide your program from the Close Program dialog (Win9* only)
How to release and renew a lease on an IP address previously obtained through Dynamic Host Configuration Protocol (DHCP)
Retrieving information about MS-DOS device names using QueryDosDevice (WinNT only)
Using IsChild() for testing ThisForm.ShowWindow property
Creating two-byte hashes for a list of URLs
Initiating Inet connection using a modem
Retrieving information about all users currently logged on to the workstation (WinNT only)
Retrieving the state of your Internet connection
Using InternetGoOnline function
How to perform Base64 encoding/decoding using Cryptography API Functions
Obtaining provider name for a specific type of network
Winsock: initializing the service in the VFP application
How to create a service object
Opening access to the Microsoft Internet functions for the application

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

DECLARE INTEGER InternetOpen IN wininet;
    STRING sAgent, INTEGER lAccessType,;
    STRING sProxyName, STRING sProxyBypass,;
    STRING lFlags

DECLARE INTEGER InternetCloseHandle IN wininet INTEGER hInet

sAgent = "w32inetopen"  && you can choose any name, say "John Dow"
sProxyName = Chr(0)     && no proxy
sProxyBypass = Chr(0)   && nothing to bypass
lFlags = 0              && no flags used

hOpen = InternetOpen(sAgent, INTERNET_OPEN_TYPE_DIRECT,;
    sProxyName, sProxyBypass, lFlags)

IF hOpen <> 0
* close the access
    ? "Handle retrieved:", hOpen
    = InternetCloseHandle (hOpen)
    ? "Failed to access the WinINet library"

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
943 bytes  
Created: 2001-07-15 12:00:00  
Modified: 2006-01-05 13:22:03  
Visits in 7 days: 62  
Listed functions:
Printer friendly API declarations
My comment:
Actually this code does nothing. It just shows how to put your hands on the Internet functions to access HTTP, FTP etc.
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-2017 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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
11 sec.Function: 'NetApiBufferSize'
Function group: 'Network Management'
22 sec.Function: 'StartPage'
33 sec.Example: 'Winsock: connecting to a news server (NNTP, port 119)'
44 sec.Example: 'How to retrieve adapter information for the local computer (including MAC address)'
54 sec.Function: 'bind'
Function group: 'Windows Sockets 2 (Winsock)'
1.1 min.Example: 'Using FrameRgn for displaying system colors'
1.32 min.Function: 'RtlCompressBuffer'
1.5 min.Function: 'CeDeleteFile'
Function group: 'Remote Application Programming (RAPI)'
1.67 min.Function: 'RegCreateKeyEx'
1.82 min.Example: 'Creating the Save dialog box to specify the drive, directory, and name of a file to save'
Advertise here!