GetNetworkConnectivityHintForInterface function (netioapi.h)

Retrieves the level and cost of network connectivity for the specified interface.

Syntax

IPHLPAPI_DLL_LINKAGE _NETIOAPI_SUCCESS_ NETIOAPI_API GetNetworkConnectivityHintForInterface(
  [in]  NET_IFINDEX                  InterfaceIndex,
  [out] NL_NETWORK_CONNECTIVITY_HINT *ConnectivityHint
);

Parameters

[in] InterfaceIndex

A value of type NET_IFINDEX representing the index of the interface for which to retrieve connectivity information.

[out] ConnectivityHint

A pointer to a value of type NL_NETWORK_CONNECTIVITY_HINT. The function sets this value to the connectivity level and cost hints for the specified interface.

Return value

In user mode, returns NO_ERROR on success, and a Win32 error code on failure. In kernel mode, returns STATUS_SUCCESS on success, and an NTSTATUS error code on failure.

Requirements

Requirement Value
Minimum supported client Windows 10, version 2004 (10.0; Build 19041)
Minimum supported server Windows Server, version 2004 (10.0; Build 19041)
Target Platform Windows
Header netioapi.h (include Iphlpapi.h)
Library Iphlpapi.lib
DLL Iphlpapi.dll