Group: IP Helper - Library: iphlpapi
How to retrieve adapter information for the local computer (including MAC address)
DWORD GetAdaptersInfo(
PIP_ADAPTER_INFO pAdapterInfo,
PULONG pOutBufLen
);
DECLARE INTEGER GetAdaptersInfo IN iphlpapi;
STRING @ pAdapterInfo,;
LONG @ pOutBufLen
pAdapterInfo [out] Pointer to a buffer that receives a linked list of IP_ADAPTER_INFO structures.
pOutBufLen [in] Pointer to a ULONG variable that specifies the size of the buffer pointed to by the pAdapterInfo parameter.
If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is one of predefined error codes.
Windows Server 2003 and Windows XP: Use the GetAdaptersAddresses function instead of GetAdaptersInfo.