GetIfEntry (Compact 2013)
3/26/2014
This function retrieves information for the specified interface on the local device.
Syntax
DWORD GetIfEntry(
PMIB_IFROW pIfRow
);
Parameters
- pIfRow
[in, out] Pointer to a MIB_IFROW structure that contains information for an interface on the local device. The dwIndex member of MIB_IFROW must be set to the index of the interface for which to retrieve information. The value for the dwIndex must be retrieved by a previous call to the GetIfTable, GetIfTable2, or GetIfTable2Ex function.
Return Value
Return code |
Description |
---|---|
NO_ERROR |
The function succeeds. |
ERROR_CAN_NOT_COMPLETE |
The request could not be completed. This is an internal error. |
ERROR_INVALID_DATA |
The data is invalid. This error is returned if the network interface index specified by the dwIndex member of the MIB_IFROW structure pointed to by the pIfRow parameter is not a valid interface index on the local device. |
ERROR_INVALID_PARAMETER |
An invalid parameter was passed to the function. This error is returned if a NULL pointer is passed in the pIfRow parameter. |
ERROR_NOT_FOUND |
The specified interface could not be found. This error is returned if the network interface index specified by the dwIndex member of the MIB_IFROW structure pointed to by the pIfRow parameter could not be found. |
ERROR_NOT_SUPPORTED |
The request is not supported. This error is returned if IPv4 is not configured on the local device. |
Other |
Use FormatMessage to obtain the message string for the returned error. |
Remarks
The GetIfEntry function retrieves information for an interface on a local device.
The dwIndex member in the MIB_IFROW structure pointed to by the pIfRow parameter must be initialized to a valid network interface index retrieved by a previous call to the GetIfTable, GetIfTable2, or GetIfTable2Ex function.
The GetIfEntry function will fail if the dwIndex member of the MIB_IFROW pointed to by the pIfRow parameter does not match an existing interface index on the local device.
Requirements
Header |
iphlpapi.h |
Library |
Iphlpapi.lib |
See Also
Reference
IP Helper Functions
GetIfEntry2
GetIfTable
GetIfTable2
GetIfTable2Ex
GetNumberOfInterfaces
MIB_ICMP
MIB_IFROW
MIB_IFTABLE
MIB_IF_ROW2
MIB_IF_TABLE2
SetIfEntry