By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,400 Members | 1,368 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,400 IT Pros & Developers. It's quick & easy.

Ping.SendAsync not working

P: n/a
I am trying to get Ping.SendAsync working and I am so far not having much
success. The completion event handler added in the following code is not
getting called. Can anyone spot what we are doing wrong?

Dim oPingEvent As New AutoResetEvent(False)

oPing = New Ping
oOptions.Ttl = 10
oOptions.DontFragment = True
AddHandler oPing.PingCompleted, AddressOf PingEvent
oPing.SendAsync(mIP, oPingEvent)
oPingEvent.WaitOne()
If oReply.Status = IPStatus.Success Then

Since the completion event handler never gets called the oPingEvent object
is never signaled. If the exact same parameters (other than the event
object) as used with Ping.Send then the call works and returns.

Suggestions?

Sid.


Jul 18 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.