Download source files - 11 Kb
IPENUM, a freeware MFC class and console
application to allow enumeration of the IP addresses a machine possesses.
V1.0 (21th April 1998)
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
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
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.
- virtual BOOL CIPEnum::EnumCallbackFunction(int nAdapter, const in_addr& address)=0;
TRUE if the the enumeration of the IP addresses should continue, FALSE to stop enumeration.
- 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
4th January 1999