Click to See Complete Forum and Search --> : Getting MAC Address using GetAdaptersAddresses


nirbr
October 21st, 2009, 07:59 AM
Hi,
I need to get the MAC address of the computer.
I saw that GetAdaptersAddresses can be used.
My question is: Assuming that the hardware hasn't changed, is this function guaranteed to return the addresses' linked-list in the same order?
Specifically, is the first address returned guaranteed to always return first?

Thanks,
Nir

Randor
October 21st, 2009, 06:38 PM
Hi Nir,

Based on my experience usermode hardware enumerations generally return in the same order as they are stored in the registry. But you should probably not rely on this. What are you trying to accomplish?

Best Wishes,
-David Delaune

nirbr
October 22nd, 2009, 04:06 AM
I want to keep track of my clients' computers. Lacking any better solution, I'm tracking by MAC address.
I know that it may change if they change their adapters, but this is as good as I possibly can.
However if I get different MAC address because the client has several adapters, than it even lowers my chances of identifying the computer

Nir

egawtry
October 22nd, 2009, 11:47 AM
Then the order doesn't matter. Store the whole linked list for that computer, then if ANY of those MAC addresses come up, that computer is IDed. That way they can switch adapters (IE between Bluetooth, WiFi, and Ethernet) without a hitch.

-Erik