Click here to Skip to main content
Licence 
First Posted 3 Mar 2000
Views 90,733
Bookmarked 19 times

IPEnum v1.01 - IP Address Enumeration

By | 3 Mar 2000 | Article
An MFC class to allow enumeration of IP addresses.
  • Download source files - 11 Kb
  • Welcome to IPENUM, a freeware MFC class and console application to allow enumeration of the IP addresses a machine possesses.


    History
    Usage
    Contacting the Author


    History

    V1.0 (21th April 1998)
    • Initial public release.

    V1.01 (4th January 1999)

    • Minor update to the documentation.
    • Provision of a VC 5 workspace file now as standard.
    • UNICODE enabled all the code.
    • IPENUM now uses MFC DLL and C Runtime DLL's instead of statically linking. This means that the IPENUM executable requires these files to be installed. If you haven't already got the MFC 4.2b DLLs on your machine (MFC42.DLL in your Windows system directory), then grab them from Microsoft's web site at http://activex.microsoft.com/controls/vc/mfc42.cab.


    Usage

    To run the IPEnu console application, open a command prompt and simple type IPEnum. It will then display all the IP addresses which the


    To use the MFC class CIPEnum in your own code, simply include the ipenum.cpp module in your project and #include ipenum.h file in whichever of your modules require it. You will then need to derive your own class from CIPEnum and override the pure virtual function EnumCallbackFunction(). Further information about this function is included below. To see this in action, have a look at the CMyIPEnum in the module main.cpp.


    CIPEnum::EnumCallbackFunction

    virtual BOOL CIPEnum::EnumCallbackFunction(int nAdapter, const in_addr& address)=0;

    Return Value:
    TRUE if the the enumeration of the IP addresses should continue, FALSE to stop enumeration.

    Parameters:

    • nAdapter -- The index of the IP address being returned. This value will be incremented each time your callback function is called.  The value will start from 0.
    • address -- The IP address for the current adapter. For further information about this structure have a look at the Win32 SDK documentation.



    Contacting the Author

    PJ Naughter
    Email: pjn@indigo.ie
    Web: http://www.naughter.com
    4th January 1999


    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

    About the Author

    PJ Naughter



    United States United States

    Member



    Sign Up to vote   Poor Excellent
    Add a reason or comment to your vote: x
    Votes of 3 or less require a comment

    Comments and Discussions

     
    You must Sign In to use this message board. (secure sign-in)
     
    Search this forum  
     FAQ
        Noise  Layout  Per page   
      Refresh
    QuestionHow can I set static IP address using c++ code and win32 API.Can anyone pls help Pinmemberan891:10 4 Jul '08  
    GeneralVery good article but... PinmemberdSolariuM4:52 29 Mar '05  
    GeneralRe: Very good article but... Pinmemberpjnaughter9:37 29 Mar '05  
    I'd suggest you check out the Win32 IPHelper functions which are now the supported ways of enumerating IP details.
    Generalim stuck with this program please help PinsussVashReilly12:20 17 Jul '03  
    Generalgethostbyaddr() PinmemberSwinefeaster7:55 25 Apr '03  
    Questionhow do I scan opened port on remote host?? PinmemberCNH21:25 11 Jun '02  
    GeneralGetting my machine own IP with C++ under linux/*ix Pinmembernayco3:34 24 Oct '01  
    Generalget ip address Pinmemberchandra12:07 8 Jan '01  
    GeneralRe: get ip address Pinmemberbenzyl rechner11:50 13 Mar '01  
    GeneralRe: get ip address Pinmemberhhelper14:39 16 Mar '03  
    GeneralRe: get ip address PinmemberFXMC5:13 19 Apr '06  
    Generalget ip address Pinmemberchandra12:07 8 Jan '01  
    QuestionHow do I enum all IPs over a domain? Pinmemberzeuss18:26 19 Dec '00  
    Generalapplication handle and IP port bound Pinsussappler22:15 25 Oct '00  
    QuestionHow can i get IP addresses of all pcs of Network ... Pinsussmanish5:07 9 Sep '00  
    QuestionHow do I get the protocol 's name? PinsussOrry4:33 20 Jul '00  
    GeneralNetmask/Broadcast IP for these IPs PinsussRyan Schneider6:03 19 May '00  

    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.

    Permalink | Advertise | Privacy | Mobile
    Web04 | 2.5.120528.1 | Last Updated 4 Mar 2000
    Article Copyright 2000 by PJ Naughter
    Everything else Copyright © CodeProject, 1999-2012
    Terms of Use
    Layout: fixed | fluid