|
-
Sep 1st, 2021, 04:25 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Fast Ping (non-blocking)
Hi there,
Could anyone help me with the Ping function?
I wish to Ping my whole local network "fast" as possible.
I tried with different API combinations like: inet_addr, GetRTTAndHopCount and IcmpSendEcho, but it's lagging and freezing the Form and it's too slow scanning the network.
My simple loop code example:
Code:
Dim itCnt As Integer
Dim lgTimeOms as Long
Dim stIpRng As String
Dim stIpAddr As String
lgTimeOms = 100
stIpAddr = ""
stIpRng = "192.168.0."
For itCnt = 1 To 255
stIpAddr = stIpRng + CStr(itCnt)
If Ping(stIpAddr, lgTimeOms) = True Then
List1.AddItem stIpAddr
End If
stIpAddr = ""
Next itCnt
Note: I already did this all with ARP and it's working very fast, but unfortunately for me, I forgot that the ARP table will be cleared/lost after every computer restart, upssss.
Thank you,
Kind regards,
Viktor
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|