Tuesday, 15 July 2014

windows - get mac addresses of wireless adapters in c++ on WinXP and above -



windows - get mac addresses of wireless adapters in c++ on WinXP and above -

i have above. found ip helper api, , works. problem on systems older vista can not identify whether adapter wireless or regular ethernet. need back upwards winxp , server 2003 well.

here relevant quote documentation(ip helper):

an ieee 802.11 wireless network interface. note adapter type returned on windows vista , later. on windows server 2003 , >windows xp , ieee 802.11 wireless network interface returns adapter type of >mib_if_type_ethernet.

so way identify wireless adapters , mac addresses on winxp/server2003 , later?

getadapteraddresses part of windows api, , should provide both info mac addresses , nic type.

the phone call homecoming construction pointing linked list of adapters.

make sure not hard code size of construction maintain portability between windows versions, because ip_adapter_addresses construction have changed size between versions.

edit:

this give mac address, since reports right type after vista

but, getiftable returns mib_iftable structure, can read mib_ifrow has dwtype, might of type if_type_ieee80211 or not. has no notes spesific vista , should valid xp unless ms messed documentation.

both of these should have physical address, should able match these 2 entries identify 1 single card.

c++ windows wireless iphelper

No comments:

Post a Comment