Q

How do you ping an IP address using VB.NET?

How do you ping an IP address using VB.NET without writing 200 lines of code? While it's probably much better if...

you do write the ping code yourself so you can control exactly how you do the ping, there's nothing stopping you from spawning off the PING.EXE program that comes with Windows itself to do the work.

In a quick experiment on Windows XP, PING.EXE returns an error code of 1 if the host did not respond. If the host responded, PING.EXE returns 0. That's one quick and dirty way to do the work. Of course, if there's security issues or you are running as a Win32 Service, you may not be able to start programs from your application so you'll have to handle that situation yourself. As I said at first, I still think you'd be much better off doing the work to code up the ping operation yourself.

This was first published in January 2004

Dig Deeper on Microsoft Windows Systems and Network Management

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

  • VDI assessment guide

    Wait! Don't implement VDI technology until you know your goals and needs. A VDI assessment should consider the benefits of a VDI ...

  • Guide to calculating ROI from VDI

    Calculating ROI from VDI requires a solid VDI cost analysis. Consider ROI calculation models, storage costs and more to determine...

  • Keep the cost of VDI storage under control

    Layering, persona management tools and flash arrays help keep virtual desktop users happy and VDI storage costs down.

Close