• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

DHCP enabled?

Hi,
i need using C++ / win32  /MFC to ind out if DHCP is enabled to a specific computer

thanks
Shay
0
Shay050799
Asked:
Shay050799
  • 2
  • 2
1 Solution
 
mblatCommented:
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
 
Shay050799Author Commented:
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
 
mblatCommented:
You need to look at the following calls

EnumDisplaySettings
EnumDisplayDevices

They should do the job...


Hope it helps....
0
 
Shay050799Author Commented:
thank you soo much it works
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now