***************************************************************** * Neveprise Inc. Delphi FAQ * ***************************************************************** * Section: Net / Internet Topic: Check if online * * Created: July 27th, 1999 Revised: July 27th, 1999 * * Updates: www.neveprise.de Info: support@neveprise.de * ***************************************************************** Q: How can I check if the machine is currently online? A: To check this, we need to call the API function InternetGet- ConnectedState() that is declared in WinInet.pas: function IsOnlineH: boolean; const Internet_Connection_Modem = 1; //just some constants we Internet_Connection_LAN = 2; // have to declare Internet_Connection_Proxy = 4; Internet_Connection_Modem_Busy = 8; var dwConnectionTypes: dWord; begin //we want to perform defualt check, no matter if via proxy or LAN: dwConnectionTypes:=Internet_Connection_Modem+Internet_Connection_LAN+Internet_Connection_Proxy; Result:=InternetGetConnectedState(@dwConnectionTypes,0); //true if online end; Blazko