Click to Rate and Give Feedback
MSDN
MSDN Library
System Services
 QueryProcessCycleTime Function

  Switch on low bandwidth view
QueryProcessCycleTime Function

Retrieves the sum of the cycle time of all threads of the specified process.

Syntax

C++
BOOL WINAPI QueryProcessCycleTime(
  __in   HANDLE ProcessHandle,
  __out  PULONG64 CycleTime
);

Parameters

ProcessHandle [in]

A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.

CycleTime [out]

The number of CPU clock cycles used by the threads of the process. This value includes cycles spent in both user mode and kernel mode.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

To enumerate the processes in the system, use the EnumProcesses function.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll

See Also

QueryIdleProcessorCycleTime
QueryThreadCycleTime

Send comments about this topic to Microsoft

Build date: 7/2/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker