Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Finding out whether DHCP is enabled

Finding out whether DHCP is enabled

Scheduled Pinned Locked Moved C / C++ / MFC
windows-adminquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Cole
    wrote on last edited by
    #1

    I need to be able to tell whether DHCP is enabled. This needs to work on 95,98,NT4 and 2000. I figured there must be registry settings for this and after digging around I've found what they are for 95 & 98. However for NT and 2000 it's slightly different. I believe that the registry key for NT is: HKLM\System\CurrentControlSet\Services\"AdapterNameHere"\ Parameters\Tcpip and the key value is "EnableDHCP". The Adapter name is stored under "HKLM\System\CurrentControlSet\Services\NetBT\Adapters" so by using this I should be able to get the setting. What I want to know is can anyone confirm this to be correct or is there an easier way? Finally for 2000 it should be easier since I can use the "GetAdaptersInfo" function which returns information on each adapter and the information contains whether DHCP is enabled. MSDN online says to use Iphlpapi.lib and Iphlpapi.h, does anyone know where these files come from, I presume there available within an SDK. Thanks.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups