INetworkConnectionCost::GetCost method

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

Syntax


HRESULT GetCost(
  [out]  DWORD *pCost
);

Parameters

pCost [out]

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 codeDescription
E_POINTER

pCost is NULL

HRESULT_FROM_WIN32(ERROR_NO_NETWORK)

Network connectivity is currently unavailable.

 

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Netlistmgr.h

IDL

Netlistmgr.idl

See also

INetworkConnectionCost

 

 

Community Additions

ADD
Show:
© 2015 Microsoft