Ping in VB.Net

  • Thread starter Thread starter Rudolf
  • Start date Start date
R

Rudolf

Is there a way to do a plain ping operation in VB.Net
using only .Net libraries?

Thanks

Rudolf
 
Hello,

Cor said:
| using only VB.Net?
?!?
;-)
Do you know someone who can put that rewritten in VB
after his Whois example?

What exactly do you want to do? Do you want to convert the code to VB.NET?
 
Hi Fergus,
My message is gone at my provider

No I thought for people who ask for it, that is often for this,

But funny is, that I had origanaly written.
Do you know someone who can put that rewritten in VB after his Whois
example?
And when you have no time maybe Fergus will help you.

But that was something I thought I could not do
:-)

I begin starting to think about a FCN-sample site

Cor
 
Hi Herfried,

Are you inviting us to join you on your site?

;-D

Regards,
Fergus

FCNH [Friendly Cor - Notable Humanitarian]
 
Hi Herfried,

Cor
|| I begin starting to think about a FCN-sample site
|| FCN - Fergus, Cor, Nick

Gang of three - needs a web site.

Herfried
|| Why not FCNH?

Indeed, we must have Herfried! ;-)
Gang of four - still needs a web site.

Fergus
|| Are you inviting us to join you on your site?

Herfied's <got> a web site!!

Hey guys - Party at Herfried's!! - Woohoo!! ;-) ;-) ;-)

:-D

Regards,
Fergus
 
Hello,

Fergus Cooney said:
Cor
|| I begin starting to think about a FCN-sample site
|| FCN - Fergus, Cor, Nick

Gang of three - needs a web site.

Herfried
|| Why not FCNH?

Indeed, we must have Herfried! ;-)
Gang of four - still needs a web site.

Fergus
|| Are you inviting us to join you on your site?

Herfied's <got> a web site!!

Hey guys - Party at Herfried's!! - Woohoo!! ;-) ;-) ;-)

LOL...

;-)))
 
Herfried,
I start to think where we can make FCNH

(Webform or JavaScript Site is the problem)

Cor
 
I want to build a ping type monitor app. I've done it before for VB 6 but
now want to do it completely over in VB.net. I did find some .Net samples
but they are using raw sockets which is not allowed/blocked on the machine
it is running on. The old ping.exe util does still work on it though.

Only if there is no other way will I try to use winapi calls again.

thanks

Rudolf
 
I attempted to do an upgrade of the vb6 code using winapi calls but this
also does not work.

When calling the WSAStartup function (in SocketsInitialize) I get a stack
overflow error. I tried different variations of the WSADATA structure but it
does not help.

The following is the declarations:

Private Structure WSADATA
Dim wVersion As Short
Dim wHighVersion As Short
<VBFixedArray(MAX_WSADescription)> Dim szDescription() As Byte
<VBFixedArray(MAX_WSASYSStatus)> Dim szSystemStatus() As Byte
Dim wMaxSockets As Integer
Dim wMaxUDPDG As Integer
Dim dwVendorInfo As Integer

Public Sub Initialize()
ReDim szDescription(MAX_WSADescription)
ReDim szSystemStatus(MAX_WSASYSStatus)
End Sub
End Structure
Const WS_VERSION_REQD As Integer = &H101s

Private Declare Function WSAStartup Lib "wsock32" (ByVal wVersionRequired As
Integer, ByRef lpWSADATA As WSADATA) As Integer

When called like this:

Dim WSAD As WSADATA
WSAD.Initialize()
If WSAStartup(WS_VERSION_REQD, WSAD) = IP_SUCCESS Then ...

It gives a stack overflow error.

What must the declarations look like to word?

thanks

Rudolf
 
I feel left out....

FCNHT

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Chaos, Panic, Disorder, my work here is done"


: Hello,
:
: > Cor
: > || I begin starting to think about a FCN-sample site
: > || FCN - Fergus, Cor, Nick
: >
: > Gang of three - needs a web site.
: >
: > Herfried
: > || Why not FCNH?
: >
: > Indeed, we must have Herfried! ;-)
: > Gang of four - still needs a web site.
: >
: > Fergus
: > || Are you inviting us to join you on your site?
: >
: > Herfied's <got> a web site!!
: >
: > Hey guys - Party at Herfried's!! - Woohoo!! ;-) ;-) ;-)
:
: LOL...
:
: ;-)))
:
: --
: Herfried K. Wagner
: MVP · VB Classic, VB.NET
: http://www.mvps.org/dotnet
:
:
 
Back
Top