INetworkCostManagerEvents::CostChanged method

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, unique] NLM_SOCKADDR *pDestAddr
);

Parameters

newCost [in]

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.

pDestAddr [in]

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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

None supported

Header

Netlistmgr.h

IDL

Netlistmgr.idl

See also

INetworkCostManagerEvents

 

 

Community Additions

ADD
Show: