CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2004
    Location
    Kathmandu, Nepal
    Posts
    84

    Use Ping Command

    How do I use Ping Command Using VB???
    Can we call Dos Applications and pass ping as arguments ?????

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: Use Ping Command

    Have a look at the shellexecute API command
    If you find my answers helpful, dont forget to rate me

  3. #3
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Use Ping Command

    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  4. #4
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    137

    Re: Use Ping Command

    yuk,

    all that code seems over the top when you consider the line command prompt you enter to ping.
    It would be cool to call up the windows command prompt and have the ping and ip address automatically entered to get the response?

    I am writing an application to track PC and software profiles in an organisation.
    Ping facility is only needed to confirm the IP of a single pc, the test is only a visual confirmation on screen.

    Has anyone found a more simple solution?
    TT

  5. #5
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    137

    Re: Use Ping Command

    I copied the code from the website quoted and successfully set it up in my application to ping the IP address data.

    However, I need to ping on the machine name (computer name) as well.
    I have no idea how to modify the code to accept this in the text1 field?

    Somehow the code validates the field to be an IP address?
    The windows command prompt happily accepts the machine name in the ping command.

    I am out of my depth with this code, I don't usually use const, type or declare functions.
    May need to read up on these.
    TT

  6. #6
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: Use Ping Command

    If you look at link properly (Cimp's Post), you will find one more example that shows you how to Ping using Host Name...

  7. #7
    Join Date
    Nov 2003
    Location
    Australia
    Posts
    137

    Re: Use Ping Command

    Thanks,

    I would have preferred to use the same form to ping either IP or Host.
    At least I have the facility.

    Maybe one day I will go over the code to understand it? ? ?
    TT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured