Jump to content

Registry and IP?


phiban

Recommended Posts

Hey guys! (Another Question).

Just wondering in xp or any other version, if i have my machine which gets its IP from a DHCP server, can i retrieve it from the Registry?

Basically Im writting a app which gets the machines IP address, which then gets sent to a database.

Any idea's how i could get the IP address? would it be in readable form, as in a string of ints?

thanks!

Link to comment
Share on other sites


It's located here:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{<GUID FOR YOUR NETWORK INTERFACE>}\DhcpIPAddress (it's a REG_SZ value). You'll find lots of other interface information here, updated every time the interface is refreshed (automatically or manually).

Link to comment
Share on other sites

cheers, i was actually looking in there but didnt check the parameters tree lol mmm....how would one pull this info out? also how would i know which interface id it was, without actually going through the list?

P.S Sorry about the additional questions :blushing:

Edited by phiban
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...