Group: Internet Functions (WinInet) - Library: wininet
Retrieving the state of your Internet connection
BOOL InternetGetConnectedStateEx(
LPDWORD lpdwFlags,
LPTSTR lpszConnectionName,
DWORD dwNameLen,
DWORD dwReserved
);
DECLARE SHORT InternetGetConnectedStateEx IN wininet;
INTEGER @ lpdwFlags,;
STRING @ lpszConnectionName,;
INTEGER dwNameLen,;
INTEGER dwReserved
lpdwFlags [out] Pointer to an unsigned long integer variable where the connection description should be returned.
lpszConnectionName [out] Pointer to a string value that receives the connection name.
dwNameLen [in] Unsigned long integer value that contains the length of the lpszConnectionName string in TCHAR.
dwReserved [in] Reserved. Must be set to zero.
Returns TRUE if there is an Internet connection, or FALSE otherwise.
Except the returned connection name this function is similar to the InternetGetConnectedState function. The InternetCheckConnection allows an application to check if a connection to the Internet can be established.