网站首页  词典首页

请输入您要查询的函数:

 

术语 getprocesstimes
释义 GetProcessTimes
语法:
C++
BOOL WINAPI GetProcessTimes(
__in HANDLE hProcess,
__out LPFILETIME lpCreationTime,
__out LPFILETIME lpExitTime,
__out LPFILETIME lpKernelTime,
__out LPFILETIME lpUserTime
);
GetProcessTimes功能
检索指定程序的时间信息。
参数
hProcess [in]
一个句柄,的时间资料要求的过程。句柄必须有PROCESS_QUERY_INFORMATION或PROCESS_QUERY_LIMITED_INFORMATION访问权限。有关更多信息,请参见过程的安全性和访问权限。
Windows Server 2003和Windows XP/2000操作系统:在处理必须有PROCESS_QUERY_INFORMATION访问权。
lpCreationTime [out]
一个 FILETIME结构,它接收的过程中创建时间的指针。
lpExitTime [out]
一个 FILETIME结构,它接收的进程退出时间的指针。如果进程尚未退出,这个结构的内容是不确定的。
lpKernelTime [out]
一个 FILETIME结构,它接收的时间,这一进程在内核模式下执行的数额指针。认为该进程的每个线程都在内核模式下执行的时间确定,然后那个时候都归纳起来以获得此值。
lpUserTime [out]
一个 FILETIME结构,它接收的时间,这一进程在用户模式下执行的数额指针。认为该进程的每个线程都在用户模式下执行的时间确定,然后那个时候都归纳起来以获得此值。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
所有的时间都表示使用FILETIME数据结构。这种结构包含两个32位值结合起来,就形成一个64位计算的100纳秒的时间单位。
进程创建和退出时间点作为这也是自1月1日午夜,在格林威治,英国1601年的时间过去了数额表示。有几个功能,应用程序可以使用这种价值观念的转换,以更广泛的有用的形式。
进程的内核模式和用户模式时间大量的时间。例如,如果一个进程在内核模式下度过一秒钟,这个功能将填补FILETIME结构的lpKernelTime指定的64位10万美元。这是100的数量在一秒钟纳秒单位。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
FILETIME
FileTimeToDosDateTime
FileTimeToLocalFileTime
FileTimeToSystemTime
进程和线程函数
过程
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetProcessTimes Function
Retrieves timing information for the specified process.
Syntax
C++
BOOL WINAPI GetProcessTimes(
__in HANDLE hProcess,
__out LPFILETIME lpCreationTime,
__out LPFILETIME lpExitTime,
__out LPFILETIME lpKernelTime,
__out LPFILETIME lpUserTime
);
Parameters
hProcess [in]
A handle to the process whose timing information is sought. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights .
Windows Server 2003 and Windows XP/2000: The handle must have the PROCESS_QUERY_INFORMATION access right.
lpCreationTime [out]
A pointer to a FILETIME structure that receives the creation time of the process.
lpExitTime [out]
A pointer 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 [out]
A pointer 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 [out]
A pointer 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.
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
All times are expressed using FILETIME data structures. Such a structure contains two 32-bit values that combine to form a 64-bit count of 100-nanosecond time units.
Process creation and exit times are points in time expressed as the amount of time that has elapsed since midnight on January 1, 1601 at Greenwich, England. There are several functions that an application can use to convert such values to more generally useful forms.
Process kernel mode and user mode times are amounts of time. For example, if a process has spent one second in kernel mode, this function will fill the FILETIME structure specified by lpKernelTime with a 64-bit value of ten million. That is the number of 100-nanosecond units in one second.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
FILETIME
FileTimeToDosDateTime
FileTimeToLocalFileTime
FileTimeToSystemTime
Process and Thread Functions
Processes
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683223(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:25:36