A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The GetAdaptersInfo function retrieves adapter information for the local computer.

Declare Function GetAdaptersInfo Lib "IPHlpApi" (IpAdapterInfo As Any, pOutBufLen As Long) As Long

Operating Systems Supported
Requires Windows 2000 or later; Requires Windows 98 or later


Parameter Information
- 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 this size is insufficient to hold the adapter information, GetAdaptersInfo fills in this variable with the required size, and returns an error code of ERROR_BUFFER_OVERFLOW.

Return Values
If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the following error codes.

The buffer size indicated by the pOutBufLen parameter is too small to hold the adapter information. The pOutBufLen parameter points to the required size.
The pOutBufLen parameter is NULL, or the calling process does not have read/write access to the memory pointed to by pOutBufLen, or the calling process does not have write access to the memory pointed to by the pAdapterInfo parameter.
No adapter information exists for the local computer.
GetAdaptersInfo is not supported by the operating system running on the local computer.
If the function fails, use FormatMessage to obtain the message string for the returned error.

Last update: 07 April 2006