?
Solved

DHCP enabled?

Posted on 2002-05-21
4
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
mblat earned 200 total points
ID: 7025589
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
ID: 7025678
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
ID: 7025714
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
ID: 7025744
thank you soo much it works
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

777 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