Suri
Suri

Reputation: 3357

GetAdaptersInfo (c++)function not working on vista and windows 7

i am using GetAdaptersInfo on windows xp to retrieve mac address.its working well on xp but neither on vista nor on windows 7. Is GetAdaptersInfo supported by windows 7 and vista. if no what api should i use to get mac address

Upvotes: 1

Views: 1749

Answers (1)

bdhar
bdhar

Reputation: 22973

DWORD GetAdaptersInfo(
  PIP_ADAPTER_INFO pAdapterInfo,
  PULONG pOutBufLen
);

How did you allocate memory for pAdapterInfo? Seems that there is some issue with stack allocation of this [in] parameter.

See this

Upvotes: 2

Related Questions