Compartilhar via


GetIfEntry2 (NETIOAPI) (Compact 2013)

3/26/2014

This function retrieves information for the specified interface on a local device.

Syntax

NETIOAPI_API 
  GetIfEntry2(
    IN OUT 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, your driver must set the InterfaceLuid member or the InterfaceIndex member of the MIB_IF_ROW2 structure to the interface to retrieve information for.

Return Value

GetIfEntry2 returns STATUS_SUCCESS if the function succeeds.

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

Error Code

Meaning

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.

See Also

Reference

IP Helper Kernel-Mode Functions
GetIfTable2 (NETIOAPI)
GetIfTable2Ex (NETIOAPI)
MIB_IF_ROW2
MIB_IF_TABLE2