判断本机网络状态是否离在线,两个返回值都是1,大大们给我个修正版好吗?
Global Const $NETWORK_ALIVE_LAN = 0x1Global Const $NETWORK_ALIVE_WAN = 0x2
$x =DLLCall("sensapi.dll","int","IsNetworkAlive","str",$NETWORK_ALIVE_LAN)
msgbox (4096,"测试",$x)
如题! DLLCall("sensapi.dll","int","IsNetworkAlive","int",$NETWORK_ALIVE_LAN) 回复 1# ailuzhen
$x =DLLCall("sensapi.dll","int","IsNetworkAlive","int*",0)
msgbox (4096,"测试",$x) 最好再加上个ping("www.baidu.com"),刚才试了一下,路由器连接上,但是不拨号的情况下,依然返回1。 看了下msdn的好像应该这么写的:#include <array.au3>
Global Const $NETWORK_ALIVE_LAN = 0x1
Global Const $NETWORK_ALIVE_WAN = 0x2
$net = DllCall("sensapi.dll", "bool", "IsNetworkAlive", "DWORD*", $NETWORK_ALIVE_LAN)
_ArrayDisplay($net)
页:
[1]