INetworkCostManagerEvents::CostChanged method (netlistmgr.h)

The CostChanged method is called to indicates a cost change for either machine-wide Internet connectivity, or the first-hop of routing to a specific destination on a connection.

Syntax

HRESULT CostChanged(
  [in] DWORD        newCost,
  [in] NLM_SOCKADDR *pDestAddr
);

Parameters

[in] newCost

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

[in] pDestAddr

An NLM_SOCKADDR structure containing an IPv4/IPv6 address that identifies the destination on which the event occurred. If destAddr is NULL, the change is a machine-wide Internet connectivity change.

Return value

Returns S_OK on success.

Requirements

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

See also

INetworkCostManagerEvents