Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving the User Datagram Protocol (UDP) listener table
Retrieving various system metrics
Using LoadLibrary
Using SQLBrowseConnect to connect to a data source through a number of iterative calls (SQL Server)
Disabling drawing in the VFP form
How to retrieve the number of objects stored in the Recycle Bin
Initiating Inet connection using a modem
Using an Event Object. Part A: running an application that creates an Event object
Using the FindMediaType function
Using the GetLogicalDriveStrings
Winsock: creating a socket that is bound to a specific service provider
Pocket PC: retrieving data from the Contacts Database
Power capabilities of the system: battery, UPS, sleep and hibernation modes, processor throttling
Retrieving configuration information for the specified workstation (Win2000/XP)
Converting a decimal string to an integer
How to create a service object
PocketPC: creating directories and files
Printf-style formatted text output in VFP
Reading data from INI files
Saying "Hello World!" with VFP and WinAPI
Creating two-byte hashes for a list of URLs
Displaying the color palette stored in an image file
How to empty the Recycle Bin
CryptoAPI: retrieving list of providers
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: 67  
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-2016 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.34), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
6 sec.Example: 'HOWTO: Use the Win32 API to Access File Dates and Times'
10 sec.Example: 'How to create non-blocking Winsock server'
Language: 'C++'
14 sec.Function: 'getsockopt'
16 sec.Example: 'Exporting DLL icon resources as .ICO files'
20 sec.Example: 'Displaying bitmap using the AlphaBlend function'
23 sec.Example: 'How to empty the Recycle Bin'
28 sec.Function: 'WNetGetProviderName'
Function group: 'Windows Networking'
31 sec.Function: 'midiOutGetNumDevs'
Function group: 'Windows Multimedia'
34 sec.Example: 'GDI+: Scrolling through large image using the mouse'
37 sec.Function: 'NetUserGetLocalGroups'
Function group: 'Network Management'
Advertise here!