GetInterfaceInfo
The GetInterfaceInfo function obtains a list of the network interface adapters on the local system.
DWORD GetInterfaceInfo (
PIP_INTERFACE_INFO pIfTable // buffer to receive info
PULONG dwOutBufLen // size of buffer );
Parameters
- pIfTable
Pointer to a buffer that receives an IP_INTERFACE_INFO structure that contains the list of adapters. This buffer should be allocated by the caller. - dwOutBufLen
Pointer to a DWORD variable. If the buffer pointed to by the pIfTable parameter is NULL, or is not large enough to contain the list of adapters, GetInterfaceInfo returns the required size in this DWORD variable.
Return Values
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Value | Meaning |
---|---|
ERROR_INVALID_PARAMETER | The dwOutBufLen parameter is NULL, or GetInterfaceInterface is unable to write to the memory pointed to by the dwOutBufLen parameter. |
ERROR_INSUFFICIENT_BUFFER | The buffer pointed to by the pIfTable parameter is not large enough. The required size is returned in the DWORD variable pointed to by the dwOutBufLen parameter. |
ERROR_NOT_SUPPORTED | This function is not supported on the operating system in use on the local system. |
Other | Use FormatMessage to obtain the message string for the returned error. |
Requirements
Runs On | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 3.0 and later | Iphlpapi.h | Iphlpapi.lib |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
FormatMessage, IP_INTERFACE_INFO
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.