Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Scanning the hierarchy of child windows down from the main VFP window
Setting properties of the window: caption and user-defined value
How to get Special Folders paths
Loading a string resource from an executable file
Playing WAV sounds simultaneously
Pocket PC: Folder Viewer
Removing FTP directory
Testing Transparent Menu Class with top-level form (requires VFP9)
Using an Event Object. Part B: running an application responding to events
Using custom Simple MapiSendMail class
Validating URLs using moniker functions
Converting an integer value to a hexadecimal string
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
How to generate GUID values
How to read email messages using Simple MAPI
How to run FoxPro application under different user name (impersonating user)
Reading parameters of streams in AVI file
Winsock: retrieving the host information corresponding to a network address
Comparing file times
Determining if an Active Network Connection is Available
Enumerating ODBC drivers available on the local computer
Printing text on the client area of the main VFP window
Retrieving graphic capabilities of default printer
Clipping mouse cursor area
Testing if a connection to an Url can be established

User rating: 9/10 (1 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 InternetCheckConnection IN wininet;
    STRING lpszUrl, INTEGER dwFlags, INTEGER dwReserved
 
#DEFINE FLAG_ICC_FORCE_CONNECTION  1
 
    = _check ("http://www.microsoft.com")
    = _check ("http://www.microsoft0.com")
    = _check ("http://fox.wikis.com/wc.dll?Wiki~FoxForumWiki")
    = _check ("http://www.universalthread.com/")
    = _check ("http://www.pinnaclepublishing.com/FT")
    = _check ("http://www.allapi.net/")
    = _check ("http://www.dotcomsolution.com/")
    = _check ("http://www.advisor.com/www/FoxProAdvisor")
 
    GO TOP
    BROWSE NORMAL NOWAIT
 
PROCEDURE _check(lcUrl)
    IF Not USED("csResult")
        CREATE CURSOR csResult (rslt L, url C(250))
    ENDIF
 
    LOCAL lResult
    lResult = (InternetCheckConnection(lcUrl, FLAG_ICC_FORCE_CONNECTION, 0)=1)
    INSERT INTO csResult VALUES (m.lResult, m.lcUrl)
 
 

User rating: 9/10 (1 votes)
Rate this code sample:
  • ~
820 bytes  
Created: 2002-08-11 18:52:05  
Modified: 2002-08-12 18:26:16  
Visits in 7 days: 120  
Listed functions:
InternetCheckConnection
Printer friendly API declarations
My comment:
When you get 404 error page (invalid Url inside a valid domain) this function still returns True. The InternetGetConnectedState provide similar functionality.
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 (54.234.126.92)
4 sec.Example: 'Testing Clipboard functions: emptying the clipboard'
8 sec.Function: 'EndPath'
3.64 hrs.Function: 'EndTask'
Function group: 'Window'
4.09 hrs.Example: 'Obtaining names of local and global groups for current user (WinNT/XP/2K)'
 Function: 'CreateProcessAsUser'
4.1 hrs.Solution: 'ContextMenu ActiveX Control'
4.22 hrs.Function: 'CeRegOpenKeyEx'
 Example: 'Retrieving geometrical parameters of the system desktop window'
4.78 hrs.
Function group: 'Dialog Box'
 Example: 'How to empty the Recycle Bin'
Google
Advertise here!