Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Current System information
Using the Semaphore object
How to test file attributes (key method for FileExists and DirectoryExists routines)
Obtaining window class name for the main VFP window
Reading current hardware profile
Saying "Hello World!" with VFP and WinAPI
Using Shell for performing operations on files
Retrieving geometrical parameters of the system desktop window
Extended OS Version info
Reading keys in the specified section of the Win.ini file
Retrieving the path of the printer-driver directory and printer-processor directory
One more way to retrieve environment strings
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it
Pocket PC: modifying keys in the System Registry
Creating two-byte hashes for a list of URLs
Retrieving current user for the process
GDI+: enumerating fonts installed on the system
Reading STARTUPINFO structure for the current VFP session
GDI+: loading image file, drawing on it, saving the result to another file
Basic Volume information
Enumerating Performance Counters
Retrieving statistics for the TCP protocol running on the local computer
Who is the first in viewing the Clipboard
Converting strings between ANSI and OEM
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
 
#DEFINE INTERNET_OPEN_TYPE_PRECONFIG 0
#DEFINE INTERNET_OPEN_TYPE_DIRECT 1
#DEFINE INTERNET_OPEN_TYPE_PROXY 3
#DEFINE INTERNET_FLAG_ASYNC 0x10000000
#DEFINE INTERNET_FLAG_FROM_CACHE 0x1000000
#DEFINE INTERNET_FLAG_OFFLINE 0x1000000
#DEFINE INTERNET_FLAG_CACHE_IF_NET_FAIL 0x10000
 
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)
ELSE
    ? "Failed to access the WinINet library"
ENDIF
 
 
 

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: 93  
Listed functions:
InternetCloseHandle
InternetOpen
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  
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 (23.22.76.170)
20.87 min.Example: 'Retrieving local computer and user names'
20.92 min.Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
9.44 hrs.Example: 'How to display a user-defined icon in the MessageBox dialog'
 Example: 'Deleting a file stored on the FTP server'
10.37 hrs.Example: 'GDI+: Scrolling through large image using the mouse'
11.06 hrs.Example: 'Obtaining provider name for a specific type of network'
 Example: 'Enumerating network resources'
11.07 hrs.Example: 'Configuring DEVMODE structure for a printer'
15.33 hrs.Function: 'CeRegOpenKeyEx'
 Example: 'Verifying a file using the Authenticode policy provider'
Google
Advertise here!