Microsoft DirectX 8.1 (C++) |
The GetValueByIndex method retrieves a statistic, by index.
Syntax
HRESULT GetValueByIndex(
long lIndex
BSTR *szName
long *lCount
double *dLast
double *dAverage
double *dStdDev
double *dMin
double *dMax
);
Parameters
lIndex
[in] Specifies the index of the statistic.
szName
[out] Pointer to a variable that receives the name of the statistic.
lCount
[out] Pointer to a variable that receives the number of values that were recorded.
dLast
[out] Pointer to a variable that receives the most recent value that was recorded.
dAverage
[out] Pointer to a variable that receives the average value.
dStdDev
[out] Pointer to a variable that receives the standard deviation of the values. If the count is less than two, the standard deviation is zero.
dMin
[out] Pointer to a variable that receives the minimum value that was recorded.
dMax
[out] Pointer to a variable that receives the maximum value that was recorded.
Return Values
Returns an HRESULT value. Possible values include the following.
Return code | Description |
S_OK | Success. |
E_INVALIDARG | Index out of range. |
E_OUTOFMEMORY | Insufficient memory. |
E_POINTER | NULL pointer argument. |
Remarks
The caller must free the string returned in szName, by calling the SysFreeString function.
See Also