INetworkConnectionCost::GetCost method (netlistmgr.h)

The GetCost method retrieves the network cost associated with a connection.

Syntax

HRESULT GetCost(
  [out] DWORD *pCost
);

Parameters

[out] pCost

A DWORD value that represents the network cost of the connection. The lowest 16 bits represent the cost level and the highest 16 bits represent the cost flags. Possible values are defined by the NLM_CONNECTION_COST enumeration.

Return value

Returns S_OK on success. Otherwise an HRESULT error code is returned. Possible values include:

Return code Description
E_POINTER
pCost is NULL
HRESULT_FROM_WIN32(ERROR_NO_NETWORK)
Network connectivity is currently unavailable.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header netlistmgr.h

See also

INetworkConnectionCost