Ping in VB.Net

R

Rudolf

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

Thanks

Rudolf
 
H

Herfried K. Wagner [MVP]

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?
 
C

Cor

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
 
F

Fergus Cooney

Hi Herfried,

Are you inviting us to join you on your site?

;-D

Regards,
Fergus

FCNH [Friendly Cor - Notable Humanitarian]
 
F

Fergus Cooney

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
 
H

Herfried K. Wagner [MVP]

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...

;-)))
 
C

Cor

Herfried,
I start to think where we can make FCNH

(Webform or JavaScript Site is the problem)

Cor
 
R

Rudolf Henning

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
 
R

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
 
T

Tom Spink

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
:
:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Ping a computer with VB.net? 7
Bitwise shift in VB.Net 2002 8
Ping 4
sample PING source code? 7
Help - PING in Vb.Net 3
Ping and Tracert 2
Pinging IP 4
Ping Function for vb2003 6

Top