网站首页  词典首页

请输入您要查询的函数:

 

术语 pdhformatfromrawvalue
释义 PdhFormatFromRawValue
语法:
C++
PDH_STATUS PdhFormatFromRawValue(
__in DWORD dwCounterType,
__in DWORD dwFormat,
__in LONGLONG *pTimeBase,
__in PPDH_RAW_COUNTER rawValue1,
__in PPDH_RAW_COUNTER rawValue2,
__out PPDH_FMT_COUNTERVALUE fmtValue
);
PdhFormatFromRawValue功能
计算一个给定的原始计数器值显示的价值。
参数
dwCounterType [in]
类型的计数器。通常,您调用PdhGetCounterInfo检索当时调用PdhGetRawCounterValue检索原始计数器计数器的值类型。
对于反类型的列表,请参阅在Windows Server 2003部署工具包计数器类型部分。 (常量的值定义在Winperf.h。)
请注意,您不能指定基本类型,例如,PERF_LARGE_RAW_BASE。
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名的最终值。
pTimeBase [in]
指针时间基准,如果必要的格式转换。如果时间的基本信息是没有必要的格式转换,这个参数的值会被忽略。要检索的时间计数器的基础,呼吁PdhGetCounterTimeBase。
rawValue1 [in]
原始计数器值用于计算可显示计数器的值。详情见PDH_RAW_COUNTER。
rawValue2 [in]
原始计数器值用于计算可显示计数器的值。详情见PDH_RAW_COUNTER。有些柜台,例如,费率电表,需要两个原始值来计算显示的值。如果计数器类型不需要第二个值,将该参数设置为NULL。此值必须是两个原始值较大。
fmtValue [out]
阿PDH_FMT_COUNTERVALUE结构得到计数器值计算。
返回值
如果函数成功,它返回ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码或一种PDH错误代码。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderPdh.h
LibraryPdh.lib
DLLPdh.dll
参见
PDH_FMT_COUNTERVALUE
PDH_RAW_COUNTER
PdhReadRawLogRecord
PdhGetCounterInfo
PdhGetRawCounterValue
PdhGetCounterTimeBase
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月23日
==英文原文==PdhFormatFromRawValue Function
Computes a displayable value for the given raw counter values.
Syntax
C++
PDH_STATUS PdhFormatFromRawValue(
__in DWORD dwCounterType,
__in DWORD dwFormat,
__in LONGLONG *pTimeBase,
__in PPDH_RAW_COUNTER rawValue1,
__in PPDH_RAW_COUNTER rawValue2,
__out PPDH_FMT_COUNTERVALUE fmtValue
);
Parameters
dwCounterType [in]
Type of counter. Typically, you call PdhGetCounterInfo to retrieve the counter type at the time you call PdhGetRawCounterValue to retrieve the raw counter value.
For a list of counter types, see the Counter Types section of the Windows Server 2003 Deployment Kit . (The constant values are defined in Winperf.h.)
Note that you cannot specify base types, for example, PERF_LARGE_RAW_BASE.
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.

pTimeBase [in]
Pointer to the time base, if necessary for the format conversion. If time base information is not necessary for the format conversion, the value of this parameter is ignored. To retrieve the time base of the counter, call PdhGetCounterTimeBase .
rawValue1 [in]
Raw counter value used to compute the displayable counter value. For details, see PDH_RAW_COUNTER .
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 .
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
PdhReadRawLogRecord
PdhGetCounterInfo
PdhGetRawCounterValue
PdhGetCounterTimeBase
Send comments about this topic to Microsoft
Build date: 7/23/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa372612(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 11:27:41