Retrieve IP information on any Windows
I used to retrieve IP and NIC information by querying windows registry. Now I'm trying to use GetAdapterAddresses() API. Using GetAdapterAddresses() to get IP is not that easy, I need to dig a long deep as I check some examples so far, anyways my question is: Calling this API will return success on all versions of Windows ie: 32bits & 64bits ?
Though Microsoft has not opened any source any one can give me an idea from where this API is actually retrieving Windows IP information.?. Is it reading Registry or some windows file.
Re: Retrieve IP information on any Windows
Well, MSDN very clear states:
Quote:
Requirements
Minimum supported client
Windows XP
Minimum supported server
Windows Server 2003
HeaderIphlpapi.h
LibraryIphlpapi.lib
DLLIphlpapi.dll
Re: Retrieve IP information on any Windows
As a general answer, MSDN states the minimum required operating system for every API that it documents. You better check that requirements section next time you use some API.
Re: Retrieve IP information on any Windows
Yes, I did check the API's support, but some says on feedback it doesn't work on Win 7 64bits, anyways which one is better. API or Registry manipulation ?
Re: Retrieve IP information on any Windows
Quote:
Originally Posted by
hypheni
... anyways which one is better. API or Registry manipulation ?
Better is using API.
What if Microsoft will change some registry entries in the next Windows version? Then they also change corresponding API code so you won't need to change anything in your projects!
Re: Retrieve IP information on any Windows
Re: Retrieve IP information on any Windows