Click here to Skip to main content
11,578,524 members (58,348 online)
Click here to Skip to main content

Ping for Windows

, 15 Feb 2001 307K 15.3K 69
Rate this:
Please Sign up or sign in to vote.
A simple Windows based ping program
<!-- Download Links -->
  • Download source files - 133 Kb
  • Download executable - 108 Kb
  • <!-- Article image -->

    Sample Image - WinPing.jpg

    <!-- Main HTML starts here -->

    Introduction

    This is an extremely simple Ping program for Windows. I'm using Chris Maunder's auto-completion combo box class and there's code borrowed from a Winsock 2.0 book. Credits are mentioned on the About box.

    Please see the code for details - it's quite simple.

    History

    7 Sep 2000:

    • Fixes to MRU Combo
    • Fixes to Duplicate host/ip addresses
    • Fixes to Ping times (Now correct)

    16 Sep 2001:

    • Updated source code

    License

    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here

    Share

    About the Author

    NormDroid
    Software Developer (Senior) Software Kinetics
    United Kingdom United Kingdom



    Software Kinetics
    are experts in developing customised and bespoke applications and have expertise in the development of desktop, mobile and internet applications on Windows.

    We specialise in:

    • User Interface Design
    • Desktop Development
    • Windows Phone Development
    • Windows Presentation Framework
    • Windows Forms
    • Windows Communication Framework
    • Windows Services
    • Network Applications
    • Database Applications
    • Web Development
    • Web Services
    • Silverlight
    • ASP.net

    Visit Software Kinetics

    You may also be interested in...

    Comments and Discussions

     
    QuestionPing Pin
    Member 1170006121-May-15 9:28
    memberMember 1170006121-May-15 9:28 
    QuestionAwesome, thank you! Pin
    J Eakin21-Mar-13 8:35
    memberJ Eakin21-Mar-13 8:35 
    Generalyou are a hero ! man Pin
    batsword4-Sep-10 19:17
    memberbatsword4-Sep-10 19:17 
    GeneralBug Pin
    StKgn22-Apr-10 0:12
    memberStKgn22-Apr-10 0:12 
    GeneralRe: Bug Pin
    Norm .net22-Apr-10 0:28
    groupNorm .net22-Apr-10 0:28 
    GeneralNon administrator account Pin
    saenz tomas24-Mar-10 7:08
    membersaenz tomas24-Mar-10 7:08 
    GeneralMy vote of 1 Pin
    Sheetal_Joshi8-Dec-09 6:10
    memberSheetal_Joshi8-Dec-09 6:10 
    Generalit is not a real multi-thread ? [modified] Pin
    Adore C++4-Dec-08 10:51
    memberAdore C++4-Dec-08 10:51 
    GeneralNot working on Vista Pin
    TRK29-Oct-07 9:35
    memberTRK29-Oct-07 9:35 
    GeneralRe: Not working on Vista Pin
    Member 446097211-Mar-08 4:30
    memberMember 446097211-Mar-08 4:30 
    GeneralRe: Not working on Vista Pin
    ashishbhadiyadra13-Apr-09 19:14
    memberashishbhadiyadra13-Apr-09 19:14 
    GeneralRe: Not working on Vista Pin
    cniculescu23-Sep-09 10:21
    membercniculescu23-Sep-09 10:21 
    GeneralRe: Not working on Vista Pin
    liugh69819-Feb-10 22:45
    memberliugh69819-Feb-10 22:45 
    GeneralRe: Not working on Vista Pin
    steveh211212-Jul-14 22:24
    membersteveh211212-Jul-14 22:24 
    GeneralRe: Not working on Vista Pin
    zhangchunming11-Mar-12 1:35
    memberzhangchunming11-Mar-12 1:35 
    GeneralExcellent work! Pin
    428820-Aug-07 10:35
    member428820-Aug-07 10:35 
    GeneralCalling OnTimer(); after calling socket( Pin
    marreoragarn10-May-07 5:33
    membermarreoragarn10-May-07 5:33 
    Hi!

    I making this program to an console app. Because of that I need to change the code. In debuging mode, after calling rawSocket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
    The socket is SOCKET == ERROR and goes into Error mode instead of going to the OnPing as it does in the winapp.


    Why does the compiler go to OnTimer after that the socket funktion is called?

    Look here
    Debug:
    ....
    ....
    -> rawSocket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
    -> void CWinPingDlg::OnTimer(UINT nIDEvent)
    ...
    ...

    I am nott familiar with sockets!

    Any suggestions?




    GOgo
    Generalwhen my firewall is open this ping program cannot ping to the web server Pin
    sude6-Dec-06 16:10
    membersude6-Dec-06 16:10 
    GeneralRequest Pin
    rahul_s99915-Jun-06 14:30
    memberrahul_s99915-Jun-06 14:30 
    GeneralRange maintaining Pin
    atunamatata13-Apr-06 21:10
    memberatunamatata13-Apr-06 21:10 
    GeneralRe: Range maintaining Pin
    webmastersitesi5-Jan-09 18:15
    memberwebmastersitesi5-Jan-09 18:15 
    GeneralWSAError: 10022 Pin
    kkooccuurr30-May-05 10:51
    memberkkooccuurr30-May-05 10:51 
    Generalsource files Pin
    surfman1910-Feb-04 1:49
    membersurfman1910-Feb-04 1:49 
    QuestionHow can I stop the ping-request Pin
    JessicaLampe13-Dec-03 5:39
    sussJessicaLampe13-Dec-03 5:39 
    QuestionHow to send and receive a broadcast ping Pin
    elsayed_mazen14-Oct-03 17:33
    memberelsayed_mazen14-Oct-03 17:33 
    Generalping under XP Pin
    yyyKaktus29-Sep-03 19:22
    memberyyyKaktus29-Sep-03 19:22 
    GeneralRe: ping under XP Pin
    mohamad14-May-04 23:38
    membermohamad14-May-04 23:38 
    GeneralRe: ping under XP Pin
    same.wong21-Aug-12 15:13
    membersame.wong21-Aug-12 15:13 
    GeneralBug Pin
    Yossi Meir15-Mar-03 21:47
    memberYossi Meir15-Mar-03 21:47 
    GeneralRe: Bug Pin
    Hanney Wang16-Mar-03 19:08
    memberHanney Wang16-Mar-03 19:08 
    GeneralNot work very well - A bug. Pin
    Hanney Wang24-Dec-02 16:36
    memberHanney Wang24-Dec-02 16:36 
    GeneralRe: Not work very well - A bug. Pin
    Jesús O.1-Feb-03 9:47
    memberJesús O.1-Feb-03 9:47 
    GeneralRe: Not work very well - A bug. Pin
    Norm Almond1-Feb-03 22:14
    memberNorm Almond1-Feb-03 22:14 
    GeneralRe: Not work very well - A bug. Pin
    Hanney Wang15-Mar-03 2:25
    memberHanney Wang15-Mar-03 2:25 
    GeneralRe: Not work very well - A bug - for Sonu Kapoor . Pin
    Hanney Wang30-Mar-03 15:36
    memberHanney Wang30-Mar-03 15:36 
    GeneralRe: Not work very well - A bug - for Sonu Kapoor . Pin
    Sonu Kapoor1-Apr-03 0:39
    memberSonu Kapoor1-Apr-03 0:39 
    GeneralRe: Not work very well - A bug - for Sonu Kapoor . Pin
    SonicYouth21-Sep-05 21:32
    memberSonicYouth21-Sep-05 21:32 
    QuestionCould you give me a TIP? Pin
    kODe mASTeR22-Nov-02 12:45
    memberkODe mASTeR22-Nov-02 12:45 
    Generalurgent !!!!! Pin
    balajiParthasarathy19-Aug-02 3:46
    sussbalajiParthasarathy19-Aug-02 3:46 
    GeneralRe: urgent !!!!! Pin
    Tak19-Oct-02 6:43
    memberTak19-Oct-02 6:43 
    GeneralFinding local IP Pin
    Camran3-Jul-02 18:05
    memberCamran3-Jul-02 18:05 
    GeneralRe: Finding local IP Pin
    Anonymous3-Jul-02 21:11
    memberAnonymous3-Jul-02 21:11 
    GeneralRe: Finding local IP Pin
    Micky Cheng3-Jul-02 21:23
    memberMicky Cheng3-Jul-02 21:23 
    GeneralRe: Finding local IP Pin
    Anonymous6-Jul-02 15:22
    memberAnonymous6-Jul-02 15:22 
    GeneralNeed Help!!!! Pin
    aimmilly19-May-02 13:12
    memberaimmilly19-May-02 13:12 
    GeneralRe: Need Help!!!! Pin
    Norm Almond3-Jul-02 21:14
    memberNorm Almond3-Jul-02 21:14 
    QuestionWin2K/NT4 only as administrator ??? Pin
    Olli22-Apr-02 23:59
    memberOlli22-Apr-02 23:59 
    AnswerRe: Win2K/NT4 only as administrator ??? Pin
    Robert W.9-Jul-03 7:39
    memberRobert W.9-Jul-03 7:39 
    GeneralRe: Win2K/NT4 only as administrator ??? Pin
    borini11-Feb-04 5:43
    memberborini11-Feb-04 5:43 
    GeneralRe: Win2K/NT4 only as administrator ??? Pin
    Laszlo Kiss12-Apr-05 23:06
    sussLaszlo Kiss12-Apr-05 23:06 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web04 | 2.8.150603.1 | Last Updated 16 Feb 2001
    Article Copyright 2000 by NormDroid
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid