Platform SDK: RAS/Routing and RAS |
The RasGetConnectionStatistics function retrieves accumulated connection statistics for the specified connection.
DWORD RasGetConnectionStatistics( HRASCONN hRasConn, // handle to the connection RAS_STATS *lpStatistics // buffer to receive statistics );
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 | Meaning |
---|---|
E_INVALID_ARG | At least one of the following is true: the hRasConn parameter is zero, the lpStatistics parameter is NULL, or the value specified by the dwSize member of the RAS_STATS structure 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 FormatMessage to retrieve the system error message that corresponds to the error code returned. |
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Ras.h.
Library: Use Rasapi32.lib.
Remote Access Service (RAS) Overview, Remote Access Service Functions, RasClearConnectionStatistics, RasDial, RasEnumConnections, RasGetLinkStatistics