Link to home
Start Free TrialLog in
Avatar of ESQuicksall
ESQuicksallFlag for United States of America

asked on

How to get a list of all IP addresses on a system using C

What C functions do I use to get a list of all IP addresses on a system? I want C not C++ and not MFC.
Avatar of ESQuicksall
ESQuicksall
Flag of United States of America image

ASKER

Opps .. this is using Windows XP and Microsoft Visual C++ version 6.0.
Avatar of asm4pic
asm4pic

what sysyem ? do you meen windows ?

Ahmed Samieh
please see above.
ASKER CERTIFIED SOLUTION
Avatar of yotamsher
yotamsher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Get all computers and their IP addressed with this code using visual c++ 6
http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5455/
Regards
DoctorMahdi
I'm using Microsoft Visual C++ version 6.0. GetIpAddrTable does not seem to exist in that. Is there a particular .h file and library I should use?
Oh yea, I'm writing in C not C++.
you need the following
include: Iphlpapi.h
and
lib: Iphlpapi.lib

and I sent you to this URL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp/getipaddrtable.asp
because it has all the details, pluss a sample

:-)
Yotam
version 6.0 does not have that file.
You'll need platform SDK (actually I think it exists on the VC6 CDs)
I have everything loaded from the CDs and when I look at help under the platform SDK functions, they are all there. The help does not mention GetIpAddrTable. I think there is another way to do it with VC6.
did you check my second post above
did you click that link?
DoctorMahdi, yes I did but it appears to be C++. At the time you posted that I realized I had forgotten to say I am using C. It is a very large embedded system and I can't change to C++.