docs

Home All functions Categories

vuNetworkPresent()

vuNetworkPresent(), LONG

Description

Detects whether a TCP/IP network is present and reports the type of connectivity that Windows currently sees.

Internally this wraps the Windows IsNetworkAlive API and returns its flag bits. That API reports:

This function is intended as a quick presence check that answers the question:
“Does Windows think I am on any network, and is a RAS or VPN style connection involved”

It is not an Internet connectivity check. For that, see vuInternetPresent and vuInternetCanReachUrl.

Parameters

Parameter Data Type Description
None   This function takes no parameters.

Returns

A LONG value that reflects the underlying IsNetworkAlive flags:

Typical patterns:

Example

CASE vuNetworkPresent()
OF 0
  MESSAGE('No network detected.')
OF 1
  MESSAGE('LAN connection detected.')
OF 2
  MESSAGE('WAN (RAS or VPN) connection detected.')
OF 3
  MESSAGE('Both LAN and WAN connections are present.')
END

Notes

Home All functions Categories