网站首页  词典首页

请输入您要查询的函数:

 

术语 pdhcalculatecounterfromrawvalue
释义 PdhCalculateCounterFromRawValue
语法:
C++
PDH_STATUS PdhCalculateCounterFromRawValue(
__in PDH_HCOUNTER hCounter,
__in DWORD dwFormat,
__in PPDH_RAW_COUNTER rawValue1,
__in PPDH_RAW_COUNTER rawValue2,
__out PPDH_FMT_COUNTERVALUE fmtValue
);
PdhCalculateCounterFromRawValue功能
计算两个计数器值显示的原始价值。
参数
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名的最终值。
rawValue1 [in]
原始计数器值用于计算可显示计数器的值。有关详细信息,请参阅PDH_RAW_COUNTER结构。
rawValue2 [in]
原始计数器值用于计算可显示计数器的值。详情见PDH_RAW_COUNTER。有些计数器(例如,速率柜)需要两个原始值来计算显示的值。如果计数器类型不需要第二个值,将该参数设置为NULL。此值必须是两个原始值较大。
fmtValue [out]
阿PDH_FMT_COUNTERVALUE结构得到计数器值计算。
返回值
如果函数成功,它返回ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码或一种PDH错误代码。以下是可能的值。
返回codeDescription
PDH_INVALID_ARGUMENTAn论点是不正确或格式不正确。
PDH_INVALID_HANDLEThe计数器句柄无效。
备注
要检索查询从目前的原料计数器的值,调用PdhGetRawCounterValue功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
参见
PDH_FMT_COUNTERVALUE
PDH_RAW_COUNTER
PdhGetFormattedCounterValue
PdhGetRawCounterValue
PdhSetCounterScaleFactor
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月23日
==英文原文==PdhCalculateCounterFromRawValue Function
Calculates the displayable value of two raw counter values.
Syntax
C++
PDH_STATUS PdhCalculateCounterFromRawValue(
__in PDH_HCOUNTER hCounter,
__in DWORD dwFormat,
__in PPDH_RAW_COUNTER rawValue1,
__in PPDH_RAW_COUNTER rawValue2,
__out PPDH_FMT_COUNTERVALUE fmtValue
);
Parameters
hCounter [in]
Handle to the counter to calculate. The function uses information from the counter to determine how to calculate the value. This handle is returned by the PdhAddCounter function.
dwFormat [in]
Determines the data type of the calculated 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 factor 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.

rawValue1 [in]
Raw counter value used to compute the displayable counter value. For details, see the PDH_RAW_COUNTER structure.
rawValue2 [in]
Raw counter value used to compute the displayable counter value. For details, see PDH_RAW_COUNTER. Some counters (for example, rate counters) require two raw values to calculate a displayable value. If the counter type does not require a second value, set this parameter to NULL. This value must be the older of the two raw values.
fmtValue [out]
A PDH_FMT_COUNTERVALUE structure that receives the calculated counter value.
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.

Remarks
To retrieve the current raw counter value from the query, call the PdhGetRawCounterValue function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
See Also
PDH_FMT_COUNTERVALUE
PDH_RAW_COUNTER
PdhGetFormattedCounterValue
PdhGetRawCounterValue
PdhSetCounterScaleFactor
Send comments about this topic to Microsoft
Build date: 7/23/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa372547(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:16:24