Hi guys,
If I want to know whether my pc has access to internet or not, would this be the least expensive but still safe way?
Thanks for any opinion.
I adapted it from xHarbour's INetAddress() documentation
If I want to know whether my pc has access to internet or not, would this be the least expensive but still safe way?
function HasInternetAccess()
LOCAL pSocket
INetInit()
pSocket := INetConnect( "www.google.com", 80 )
lRet := !empty( INetAddress( pSocket ))
INetClose( pSocket )
INetCleanUp()
RETURNThanks for any opinion.
I adapted it from xHarbour's INetAddress() documentation
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
BCC5.82/BCC7.3
xHarbour/Harbour