// wdm.h
NTSTATUS KeConvertPerformanceCounterToAuxiliaryCounter(
[in] ULONG64 PerformanceCounterValue,
[out] PULONG64 AuxiliaryCounterValue,
[out, optional] PULONG64 ConversionError
);
View the official Windows Driver Kit DDI referenceNo description available.
The KeConvertPerformanceCounterToAuxiliaryCounter routine converts the specified performance counter value into an auxiliary counter value.
PerformanceCounterValue [in]The performance counter value to convert.
AuxiliaryCounterValue [out]A pointer to the variable that contains the converted auxiliary counter value.
ConversionError [out, optional]A pointer to a variable that contains the estimated conversion error in units of nanosecond.
KeConvertPerformanceCounterToAuxiliaryCounter can return one of the following:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The conversion succeeded. |
| STATUS_NOT_SUPPORTED | Auxiliary counter is not supported. |
| STATUS_INVALID_PARAMETER | The PerformanceCounterValue value is not valid. For example, the value is earlier than the last system boot/recovery, or is out of the +/- 10s range compared to the current performance counter value. |
| STATUS_UNSUCCESSFUL | The routine cannot convert the specified value with acceptable accuracy. |
Make sure that the specified performance counter value is:
The ConversionError value is the difference, in nanoseconds, between the expected calculated value and the actual calculated value for the auxiliary counter. If the ConversionError value is greater than the expected value (determined by you), then call the routine again.
KeConvertAuxiliaryCounterToPerformanceCounter