Avatar of ESQuicksall
ESQuicksall
Flag 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.
Programming

Avatar of undefined
Last Comment
ESQuicksall

8/22/2022 - Mon
ESQuicksall

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

what sysyem ? do you meen windows ?

Ahmed Samieh
ESQuicksall

ASKER
please see above.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
ASKER CERTIFIED SOLUTION
yotamsher

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
DoctorMahdi

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
ESQuicksall

ASKER
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?
ESQuicksall

ASKER
Oh yea, I'm writing in C not C++.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
yotamsher

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
ESQuicksall

ASKER
version 6.0 does not have that file.
yotamsher

You'll need platform SDK (actually I think it exists on the VC6 CDs)
Your help has saved me hundreds of hours of internet surfing.
fblack61
ESQuicksall

ASKER
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.
DoctorMahdi

did you check my second post above
did you click that link?
ESQuicksall

ASKER
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++.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.