Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
High-powered ALLTRIM
How to display the port-configuration dialog box for a port on the specified server
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Testing an ODBC connection for supporting specific functionality
A procedure for setting file times
Animating a transition of the VFP form (a wire-frame rectangle)
GetProcessVersion points at target OS
How to assemble an array of strings and pass it to external function
Printing text with the Escape function
Programmatically removing submenus from VFP main menu
Retrieving the name of the primary domain controller (PDC) and join status information (NT/2000/XP)
Using FrameRgn for displaying system colors
Using shared memory to exchange data between two FoxPro applications
Using the SetErrorMode for determining if a floppy drive is ready
Wininet last error description
Creating a device context for the specified printer
DiskFreeSpace class
Enumerating files opened on the network
Enumerating ODBC Data Sources available on the local computer
How to display a Task Dialog (Vista)
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to make the caption of a VFP application flashing in the Windows task bar
How to retrieve number of objects in the Recycle Bin
Obtaining I/O counts for the current process
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: 44  
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 (50.16.166.175)
4 sec.Example: 'Adding printer to the list of supported printers for the specified server'
3.86 hrs.Example: 'How to play AVI file on the _screen'
 Example: 'Custom GDI+ class'
5.85 hrs.Function: 'CreateCompatibleDC'
Function group: 'Device Context'
 Example: 'Displaying animated images on FoxPro form with BitBlt and StretchBlt functions'
6.94 hrs.Example: 'Retrieving information about the main VFP window'
6.95 hrs.Example: 'How to empty the Recycle Bin'
 Example: 'How to position the GETPRINTER() dialog'
10.87 hrs.Example: 'Accessing LSA Policy object (Local Security Authority)'
 Function: 'LsaOpenPolicy'
Google
Advertise here!