Solved

DHCP enabled?

Posted on 2002-05-21
4
173 Views
Last Modified: 2010-04-02
Hi,
i need using C++ / win32  /MFC to ind out if DHCP is enabled to a specific computer

thanks
Shay
0
Comment
Question by:Shay050799
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
mblat earned 50 total points
Comment Utility
To do that you need to read registry entry.

For Win2000

it is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCpip\Parameters.

Then you need to go to read Adapters
find out what Interfaces they are using and
now you can read interfaces and find out id they are using DHCP.

Needless to say that as any registry hack this is highly unportable, bound to change in next service pack and from OS to OS ( I am quite sure that keys are different on Win95 machines) and works only for Microsoft stack.

My suggestion would be here to start shell, run ipconfig  utility to a file and then parse it.

something like

ipconfig /all >> ipconfig.txt

Hope it helps...
 
0
 
LVL 3

Author Comment

by:Shay050799
Comment Utility
excellent !!! thanks a lot
maybe you can help me with something else
i m looking for the video max card resolution and num of colors


Shay
0
 
LVL 4

Expert Comment

by:mblat
Comment Utility
You need to look at the following calls

EnumDisplaySettings
EnumDisplayDevices

They should do the job...


Hope it helps....
0
 
LVL 3

Author Comment

by:Shay050799
Comment Utility
thank you soo much it works
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now