GetProcessTimes The GetProcessTimes function obtains timing information about a specified process.
VB4-32,5,6
Declare Function GetProcessTimes Lib "kernel32" (ByVal hProcess As Long, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETIME, lpUserTime As FILETIME) As Long |
VB.NET
System.Diagnostics.Process.StartTime |
Operating Systems Supported |
Requires Windows NT 3.1 or later; Win9x/ME: Not supported |
- hProcess
An open handle that specifies the process whose timing information is sought. This handle must be created with PROCESS_QUERY_INFORMATION access. For more information, see Process Objects.
- lpCreationTime
Points to a FILETIME structure that receives the creation time of the process.
- lpExitTime
Points to a FILETIME structure that receives the exit time of the process. If the process has not exited, the content of this structure is undefined.
- lpKernelTime
Points to a FILETIME structure that receives the amount of time that the process has executed in kernel mode. The time that each of the threads of the process has executed in kernel mode is determined, and then all of those times are summed together to obtain this value.
- lpUserTime
Points to a FILETIME structure that receives the amount of time that the process has executed in user mode. The time that each of the threads of the process has executed in user mode is determined, and then all of those times are summed together to obtain this 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. |
|