回复 13# au3x
手误,自己改改就行了呗~Dim $MAC, $MACSize, $i, $sIP, $aR, $aR1
$MAC = DllStructCreate("byte[6]")
$MACSize = DllStructCreate("int")
DllStructSetData($MACSize, 1, 6)
$aR1 = DllCall("Ws2_32.dll", "int", "inet_addr", "str", @IPAddress1)
$aR = DllCall("iphlpapi.dll", "int", "SendARP", "int", $aR1[0], "int", 0, "ptr", DllStructGetPtr($MAC), "ptr", DllStructGetPtr($MACSize))
$sIP = ""
For $i = 0 To 5
If $i Then $sIP = $sIP & ":"
$sIP = $sIP & Hex(DllStructGetData($MAC, 1, $i + 1), 2)
Next
MsgBox(0, "MAC地址查看器", "mac地址为:" & $sIP)
|