Platform SDK: Internet Protocol Helper |
The GetPerAdapterInfo function retrieves information about the adapter corresponding to the specified interface.
DWORD GetPerAdapterInfo( ULONG IfIndex, // index of the interface PIP_PER_ADAPTER_INFO pPerAdapterInfo, // buffer to receive info PULONG pOutBufLen // size of buffer to receive info );
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
ERROR_BUFFER_OVERFLOW | The buffer size indicated by the pOutBufLen parameter is too small to hold the adapter information. The pOutBufLen parameter points to the required size. |
ERROR_INVALID_PARAMETER | 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. |
ERROR_NOT_SUPPORTED | GetPerAdapterInfo is not supported by the operating system running on the local computer. |
Other | If the function fails, use FormatMessage to obtain the message string for the returned error. |
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Iphlpapi.h.
Library: Use Iphlpapi.lib.