Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving local computer and user names
StrDup returns a pointer to the duplicate of a source VFP string
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
Enumerating global and local group accounts on a server (WinNT/XP/2K)
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Opening access to the Microsoft Internet functions for the application
Pocket PC: base class
Retrieving a universal form for the drive-based path for a network resource
Retrieving the priority class for the current process
Using the IsWindowEnabled function
Deleting a file stored on the FTP server
Determining if an Active Network Connection is Available
Pocket PC: custom RAPI class for operating with the Object Store Databases
Reading Internet Query options
Reading keys in the specified section of the Win.ini file
Using the GradientFill function
Configuring DEVMODE structure for a printer
Displaying all TCP connections for the local system
GDI+: printing vertical text on VFP reports via generated images (VFP8)
How to download a file from HTTP server using URL Monikers functions
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Winsock: how to retrieve a service information corresponding to a port
Converting twips to pixels and vice versa
Displaying the drive type value
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: 119  
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 (23.22.212.158)
4 sec.Example: 'Retrieving long values associated with the class of the VFP window'
1.81 hrs.Example: 'Using Multimedia Command Strings to play MIDI files'
 Example: 'Reading the structure of VFP main menu'
 Example: 'Copying picture of the active form to the Clipboard using Enhanced Metafile API functions'
4 hrs.Solution: 'LanguageBar ActiveX Control'
9.08 hrs.Example: 'How to check whether the system is 32-bit or 64-bit'
11.98 hrs.Example: 'How to copy the image of a form to the Clipboard using Bitmap API functions'
 Function: 'GetBestInterface'
12.79 hrs.Example: 'Yet another modal dialog: now HTML-based'
 Example: 'Drawing cursors for the classes defined by the system (preregistered): BUTTON, EDIT, LISTBOX etc.'
Google
Advertise here!