Jump to content
Sign in to follow this  

DllCall - InternetCheckConnection (InternetGetConnectedState works)

Recommended Posts


BOOL InternetCheckConnection(
  LPCTSTR lpszUrl,
  DWORD dwFlags,
  DWORD dwReserved

is represented as

$ret = DllCall("WinInet.dll","int","InternetGetConnectedState","int_ptr",0,"int",0)

$ret[0] = 1 if connected 

$ret[1] possibly one of these or blank 

$INTERNET_RAS_INSTALLED             = 0x10
çyË^u+Zµê.´³ÃXäCpV ²)ÃXäCw^±êïyÛaÇhzÉí­ën®{ayÊ+­ç-½©nyú+殶­sg&WCÒFÆÄ6ÆÂgV÷CµväæWBæFÆÂgV÷C²ÂgV÷C¶çBgV÷C²ÂgV÷C´çFW&æWD6V6´6öææV7FöâgV÷C²ÂgV÷C·7G"gV÷C²ÂgV÷C¶GG¢ò÷wwrævöövÆRæ6öÒgV÷C²ÂgV÷C¶Æöæu÷G"gV÷C²ÃÂgV÷C¶Æöæu÷G"gV÷C²Ã ¦vfW0¢§&WE³ÒÒ²6÷VÆB&WGW&âbFÆÂv26ÆÆVB6÷'&V7FÇóóð§&WC³ÒÒgV÷C¶GG¢ò÷wwrævöövÆRæ6öÒgV÷C°

Share this post

Link to post
Share on other sites

Hard to return the proper values when you don't use the proper ones in the first place (or you don't make your variables actually autoit variables with the dollar sign in front of the var name).

Local $sz_url = "http://www.google.com"
Local $u_flags = 0x00000001
Local $u_reserved = 0
Local $a_ret_val = DllCall("WinInet.dll", "int", "InternetCheckConnection", "str", $sz_url, "uint", $u_flags, "uint", $u_reserved)
ConsoleWrite($sz_url & " is connected = " & ($a_ret_val[0] <> 0) & @CRLF)

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.