网站首页  词典首页

请输入您要查询的函数:

 

术语 pdhcomputecounterstatistics
释义 PdhComputeCounterStatistics
语法:
C++
PDH_STATUS PdhComputeCounterStatistics(
__in PDH_HCOUNTER hCounter,
__in DWORD dwFormat,
__in DWORD dwFirstEntry,
__in DWORD dwNumEntries,
__in PPDH_RAW_COUNTER lpRawValueArray,
__out PPDH_STATISTICS data
);
PdhComputeCounterStatistics功能
计算了一个从原始值数组计数器统计。
参数
hCounter [in]
处理的柜台您要计算的统计数字。该PdhAddCounter函数返回此句柄。
dwFormat [in]
决定了格式化值的数据类型。指定下列值之一。
ValueMeaning
PDH_FMT_DOUBLEReturn作为双精度浮点计算的实际价值。
PDH_FMT_LARGEReturn作为一个64位整数计算值。
PDH_FMT_LONGReturn作为一个长整数计算值。
您可以使用按位包容性的OR运算符(|)来组合与下列因素之一缩放的数据类型。
ValueMeaning
PDH_FMT_NOSCALEDo并不适用于计算计数器的比例因子。
PDH_FMT_NOCAP100Counter值大于100(例如,计数器值衡量处理器的多处理器计算机上的负载)将不会被重置为100。默认行为是计数器的值是在100值上限。
PDH_FMT_1000Multiply的1000名的最终值。
dwFirstEntry [in]
零基础的第一个原始计数器值的索引使用开始计算。该指数值必须指向的缓冲区中最古老的项目。函数始于此项目,并通过扫描的缓冲区,在最后一项回到缓冲区的开始,到dwFirstEntry - 1项,它是假定为最新或包装的最新数据。
dwNumEntries [in]
原计数器值的数目在lpRawValueArray缓冲区。
lpRawValueArray [in]
阵列结构的PDH_RAW_COUNTER包含dwNumEntries项。
数据[out]
阿PDH_STATISTICS结构,接收计数器统计。
返回值
如果函数成功,它返回ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码或一种PDH错误代码。以下是可能的值。
返回codeDescription
PDH_INVALID_ARGUMENTAn论点是不正确或格式不正确。
PDH_INVALID_HANDLEThe计数器句柄无效。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
参见
PdhCalculateCounterFromRawValue
PdhGetRawCounterValue
PDH_RAW_COUNTER
PdhSetCounterScaleFactor
PDH_STATISTICS
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月23日
==英文原文==PdhComputeCounterStatistics Function
Computes statistics for a counter from an array of raw values.
Syntax
C++
PDH_STATUS PdhComputeCounterStatistics(
__in PDH_HCOUNTER hCounter,
__in DWORD dwFormat,
__in DWORD dwFirstEntry,
__in DWORD dwNumEntries,
__in PPDH_RAW_COUNTER lpRawValueArray,
__out PPDH_STATISTICS data
);
Parameters
hCounter [in]
Handle of the counter for which you want to compute statistics. The PdhAddCounter function returns this handle.
dwFormat [in]
Determines the data type of the formatted value. Specify one of the following values.
ValueMeaning
PDH_FMT_DOUBLEReturn the calculated value as a double-precision floating point real.
PDH_FMT_LARGEReturn the calculated value as a 64-bit integer.
PDH_FMT_LONGReturn the calculated value as a long integer.

You can use the bitwise inclusive OR operator (|) to combine the data type with one of the following scaling factors.
ValueMeaning
PDH_FMT_NOSCALEDo not apply the counter's scaling factors in the calculation.
PDH_FMT_NOCAP100Counter values greater than 100 (for example, counter values measuring the processor load on multiprocessor computers) will not be reset to 100. The default behavior is that counter values are capped at a value of 100.
PDH_FMT_1000Multiply the final value by 1,000.

dwFirstEntry [in]
Zero-based index of the first raw counter value to use to begin the calculations. The index value must point to the oldest entry in the buffer. The function starts at this entry and scans through the buffer, wrapping at the last entry back to the beginning of the buffer and up to the dwFirstEntry-1 entry, which is assumed to be the newest or most recent data.
dwNumEntries [in]
Number of raw counter values in the lpRawValueArray buffer.
lpRawValueArray [in]
Array of PDH_RAW_COUNTER structures that contain dwNumEntries entries.
data [out]
A PDH_STATISTICS structure that receives the counter statistics.
Return Value
If the function succeeds, it returns ERROR_SUCCESS.
If the function fails, the return value is a system error code or a PDH error code . The following are possible values.
Return codeDescription
PDH_INVALID_ARGUMENTAn argument is not correct or is incorrectly formatted.
PDH_INVALID_HANDLEThe counter handle is not valid.

Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
See Also
PdhCalculateCounterFromRawValue
PdhGetRawCounterValue
PDH_RAW_COUNTER
PdhSetCounterScaleFactor
PDH_STATISTICS
Send comments about this topic to Microsoft
Build date: 7/23/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa372573(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:23:08