LAN Web TCP Delphi

Title: are we connect to internet?
Question: how to advertent to connect to internet?
Answer:
with use the Wininet unit, we can discern to connect to internet.
this function is sample:
uses Wininet ;
function isconnected : Boolean ;
var
connectiontype: DWORD ;
begin
connectiontype:=INTERNET_CONNECTION_MODEM // type of connection
+INTERNET_CONNECTION_LAN
+INTERNET_CONNECTION_PROXY ;
Result:=InternetGetConnectedState(@connectiontype,0);//are we connect?
end;
is result = true then the system is connect to internet