Skip to content

Latest commit

 

History

History
55 lines (35 loc) · 1.24 KB

GetAdaptersInfo.md

File metadata and controls

55 lines (35 loc) · 1.24 KB

Home

Function name : GetAdaptersInfo

Group: IP Helper - Library: iphlpapi


The GetAdaptersInfo function retrieves adapter information for the local computer.


Code examples:

How to retrieve adapter information for the local computer (including MAC address)

Declaration:

DWORD GetAdaptersInfo(
	PIP_ADAPTER_INFO pAdapterInfo,
	PULONG pOutBufLen
);
  

FoxPro declaration:

DECLARE INTEGER GetAdaptersInfo IN iphlpapi;
	STRING @ pAdapterInfo,;
	LONG   @ pOutBufLen
  

Parameters:

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.


Return value:

If the function succeeds, the return value is ERROR_SUCCESS. If the function fails, the return value is one of predefined error codes.


Comments:

Windows Server 2003 and Windows XP: Use the GetAdaptersAddresses function instead of GetAdaptersInfo.