Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Saving available locale records into a cursor
Using LoadLibrary
Winsock: how to retrieve a service information corresponding to a service name
Winsock: initializing the service in the VFP application
Building a tree of subdirectories for a given path using FindFile functions
Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)
Obtaining MAC address through Address Resolution Protocol (ARP) request
Reading Internet Query options
Retrieving information about all users currently logged on to the workstation (WinNT only)
Who owns the Windows Clipboard
Hiding mouse cursor
Pocket PC: System Registry Viewer
How to drag a Form not using its Titlebar or Caption
Retrieving the IP-to-physical address mapping table
Using the Semaphore object
Current System information
How to play a waveform sound (a WAV file in particular)
Memory usage info for current VFP session (WinNT only)
Reading current hardware profile
Retrieving geometrical parameters of the system desktop window
Retrieving the path of the printer-driver directory and printer-processor directory
Determining whether or not the system is connected to the Internet
Enumerating connections made to a shared resource for the local computer (WinNT only)
Obtaining window class name for the main VFP window
Determining if an Active Network Connection is Available

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 NETWORK_ALIVE_LAN 1
#DEFINE NETWORK_ALIVE_WAN 2
#DEFINE NETWORK_ALIVE_AOL 4
 
DECLARE INTEGER IsNetworkAlive IN sensapi INTEGER @lpdwFlags
DECLARE INTEGER GetLastError IN kernel32
 
LOCAL lnMode
lnMode = 0
IF IsNetworkAlive(@lnMode) = 0
    ? "Error code: ", GetLastError()
ELSE
    ? "The computer has one or more LAN cards that are active:",;
        (lnMode=NETWORK_ALIVE_LAN)
 
    ? "The computer has one or more active RAS connections:",;
        (lnMode=NETWORK_ALIVE_WAN)
 
    * Win95, Win98 only
    ? "The computer is connected to the America Online network:",;
        (lnMode=NETWORK_ALIVE_AOL)
ENDIF
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
607 bytes  
Created: 2002-08-10 12:03:15  
Modified: 2002-08-10 12:04:56  
Visits in 7 days: 86  
Listed functions:
GetLastError
IsNetworkAlive
Printer friendly API declarations
My comment:
Check similar VB example "Determining if an Active Network Connection is Available" at the VBNet.
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 (107.22.127.92)
1.81 hrs.Example: 'Using the CreateFile'
3.31 hrs.Example: 'How to fill a buffer with random bytes using Cryptography API Functions'
3.89 hrs.Example: 'How to display the Properties dialog box for a file (ShellExecuteEx)'
6.84 hrs.Example: 'GDI+: printing vertical text on VFP reports via generated images (VFP8)'
 Function: 'AlphaBlend'
Function group: 'Bitmap'
 Example: 'Using MessageBeep'
Language: 'C#'
12.89 hrs.Example: 'Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)'
 Example: 'Retrieving long values associated with the class of the VFP window'
13.13 hrs.Function: 'SHSimpleIDListFromPath'
 Function: 'AddPrinter'
Function group: 'Printing and Print Spooler'
Google
Advertise here!