Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function retrieves accumulated statistics for the specified link in a RAS multilink connection.

Syntax

DWORD RasGetLinkStatistics(
  HRASCONN 
hRasConn, 
  DWORD 
dwSubEntry, 
  RAS_STATS* 
lpStatistics 
);

Parameters

hRasConn

Handle to the connection. Use RasDialor RasEnumConnectionsto obtain this handle.

dwSubEntry

Specifies the subentry that corresponds to the link for which to retrieve statistics.

lpStatistics

Pointer to a RAS_STATSstructure to receive the statistics. Set the dwSizemember of this structure to sizeof(RAS_STATS)before calling RasGetLinkStatistics. This parameter cannot be NULL.

Return Value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the following error codes.

Value Description

E_INVALID_ARG

At least one of the following is true: the hRasConnparameter is zero, the dwSubEntryparameter is zero, the lpStatisticsparameter is NULL, or the value specified by the dwSizemember of the RAS_STATSstructure specifies a version of the structure that is not supported by the operating system in use.

ERROR_NOT_ENOUGH_MEMORY

The function could not allocate sufficient memory to complete the operation.

Other

Use FormatMessageto retrieve the system error message that corresponds to the error code returned.

Requirements

Header ras.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also