GetIfEntry2 (Compact 2013)
3/26/2014
This function retrieves information for the specified interface on the local computer.
Syntax
NETIOAPI_API GetIfEntry2(
PMIB_IF_ROW2 Row
);
Parameters
- Row
A pointer to a MIB_IF_ROW2 structure that, on successful return, receives information for an interface on the local device. On input, the InterfaceLuid or the InterfaceIndex member of the MIB_IF_ROW2 must be set to the interface for which to retrieve information.
Return Value
If the function succeeds, the return value is NO_ERROR.
If the function fails, the return value is one of the following error codes.
Return code |
Description |
---|---|
ERROR_INVALID_PARAMETER |
An invalid parameter was passed to the function. This error is returned if a NULL pointer is passed in the Row parameter. |
STATUS_NOT_FOUND |
The specified interface could not be found. This error is returned if the network interface specified by the InterfaceLuid or InterfaceIndex member of the MIB_IF_ROW2 pointed to by the Row parameter could not be found. |
Other |
Use the FormatMessage function to obtain the message string for the returned error. |
Remarks
On input, at least one of the following members in the MIB_IF_ROW2 structure passed in the Row parameter must be initialized: InterfaceLuid or InterfaceIndex. The fields are used in the order listed earlier. So if the InterfaceLuid is specified, this member is used to determine the interface. If no value was set for the InterfaceLuid member (the value of this member was set to zero), the InterfaceIndex member is next used to determine the interface.
On output, the remaining fields of the MIB_IF_ROW2 structure pointed to by the Row parameter are filled in.
Note that the Netioapi.h header file is automatically included in Iphlpapi.h header file, and should never be used directly.
See Also
Reference
IP Helper Functions
GetIfEntry
GetIfTable
GetIfTable2
GetIfTable2Ex
MIB_IFROW
MIB_IFTABLE
MIB_IF_ROW2
MIB_IF_TABLE2