Sver
Full Member
Posts: 145
|
Post by Sver on Dec 12, 2023 13:08:47 GMT -5
'InternetGetConnectedState
'InternetGetConnectedState
dwReserved=0 open "wininet.dll" for dll as #inet calldll #inet, "InternetGetConnectedState",lpdwFlags as ulong, dwReserved As long, result As long close #inet
print lpdwFlags print result end
|
|
|
Post by tsh73 on Dec 12, 2023 15:28:39 GMT -5
|
|
|
Post by Rod on Dec 13, 2023 3:14:41 GMT -5
If my memory serves this snippet tells you if you have a network adaptor but does not in fact confirm you are connected to the internet. Work rounds include downloading. Known url. But I would need to search for the original code and discussion.
|
|
Sver
Full Member
Posts: 145
|
Post by Sver on Dec 13, 2023 5:10:46 GMT -5
Rod, For me it works.
For both, check website and connection
open "wininet.dll" for dll as #inet callDll #inet, "InternetCheckConnectionA", "http://www.google.com/" as ptr,1 as long,_ 'try http://www.gogghhhogle.com/ dwReserved as long,_ result as long close #inet
print result end
'or 'httpget$(url$) produce a empty string$
|
|