-
September 23rd, 2012, 01:13 AM
#1
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.
◄◄ hypheni ►►
-
September 24th, 2012, 05:16 AM
#2
Re: Retrieve IP information on any Windows
Well, MSDN very clear states:
Requirements
Minimum supported client
Windows XP Minimum supported server
Windows Server 2003 Header
Iphlpapi.h Library
Iphlpapi.lib DLL
Iphlpapi.dll
Victor Nijegorodov
-
September 24th, 2012, 05:54 AM
#3
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.
-
September 24th, 2012, 10:58 AM
#4
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 ?
◄◄ hypheni ►►
-
September 24th, 2012, 11:28 AM
#5
Re: Retrieve IP information on any Windows
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!
Victor Nijegorodov
-
September 24th, 2012, 11:30 AM
#6
Re: Retrieve IP information on any Windows
◄◄ hypheni ►►
-
September 24th, 2012, 02:04 PM
#7
Re: Retrieve IP information on any Windows
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|