Function Reference


_WinAPI_IsNetworkAlive

Determines whether or not a local system is connected to a network, and identifies the type of network connection

#include <WinAPIDiag.au3>
_WinAPI_IsNetworkAlive ( )

Return Value

Success: The type of network connection ($NETWORK_ALIVE_*) if a local system is connected to a network.
Failure: 0 and sets the @error flag to non-zero, @extended flag contains last error code.

Remarks

Always check @error flag before checking the return value of this function. If the @error is not 0,
the function has failed and the following values do not apply.

This function is only available for TCP/IP connections.

See Also

Search IsNetworkAlive in MSDN Library.

Example

#include <WinAPIDiag.au3>

ConsoleWrite('Internet connected: ' & (_WinAPI_IsNetworkAlive() <> 0) & @CRLF)