Solved

DHCP enabled?

Posted on 2002-05-21
4
176 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

785 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