GetIfEntry2 - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netioapi.h

NETIOAPI_API GetIfEntry2(
  _Inout_ PMIB_IF_ROW2 Row
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (getifentry2)

GetIfEntry2 function

The GetIfEntry2 function retrieves information for the specified interface on a local computer.

[!IMPORTANT] For driver developers, it is recommended to use GetIfEntry2Ex with MibIfEntryNormalWithoutStatistics when possible, in order to avoid a deadlock when servicing NDIS OIDs.

Parameters

Return value

GetIfEntry2 returns STATUS_SUCCESS if the function succeeds.

If the function fails, GetIfEntry2 returns one of the following error codes:

Return code Description
STATUS_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 function cannot find the network interface that is specified by the InterfaceLuid or InterfaceIndex member of the MIB_IF_ROW2 structure that the Row parameter points to.
Other Use the FormatMessage function to obtain the message string for the returned error.

Remarks

On input, your driver must initialize at least the InterfaceLuid or InterfaceIndex member in the MIB_IF_ROW2 structure that is passed in the Row parameter. The members are used in the order that is listed earlier. So if 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 that the Row parameter points to are filled in.

Requirements

Target platform Universal
Version Available in Windows Vista and later versions of the Windows operating systems.
Header Netioapi.h (include Netioapi.h)
Library Netio.lib
IRQL < DISPATCH_LEVEL

See also

GetIfTable2

GetIfTable2Ex

MIB_IF_ROW2

MIB_IF_TABLE2