NPGetConnectionPerformance

This function returns information about the expected performance of a connection used to access a network resource. The request can be only for a network resource to which there is currently a connection.

The information returned can be an estimate only. Note that if the network cannot obtain information about the resource on the network, then it can return information about the network adapter and its associated performance, setting dwFlags accordingly.


DWORD NPGetConnectionPerformance(
  LPTSTR lpRemoteName,
  LPNETCONNECTINFOSTRUCT lpNetConnectInfo
  );

lpRemoteName

Contains the remote name for a resource for which a connection exists.

lpNetConnectInfo

This is a pointer to a NETCONNECTINFOSTRUCT structure which is filled in by the NP if the provider has a connection to the network resource. With the exception of the cbStructure field, all other fields are zero filled before Mpr.dll passes the request on to the NPs, and the provider has to write to fields only for which it has information available. Also, for rate values, one means that the performance is better than can be represented in the unit.

WN_BAD_LOCALNAME

lpLocalName is invalid.

WN_NOT_CONNECTED

lpRemoteName not a connected network resource.

WN_NO_NETWORK

The network is not present.