请输入您要查询的百科知识:

 

词条 GetProcessTimes
释义

GetProcessTimes

VB声明

Declare Function GetProcessTimes Lib "kernel32" Alias "GetProcessTimes" (ByVal hProcess As Long, lpCreationTime As FILETIME, lpExitTime As FILETIME, lpKernelTime As FILETIME, lpUserTime As FILETIME) As Long

说明

获取与一个进程的经过时间有关的信息

返回值

Long,非零表示成功,零表示失败。会设置GetLastError

参数表

参数 类型及说明

hProcess Long,一个进程句柄

lpCreationTime FILETIME,指定一个FILETIME结构,在其中装载进程的创建时间

lpExitTime FILETIME,指定一个FILETIME结构,在其中装载进程的中止时间

lpKernelTime FILETIME,指定一个FILETIME结构,在其中装载进程花在内核模式上的总时间

lpUserTime FILETIME,指定一个FILETIME结构,在其中装载进程花在用户模式上的总时间

适用平台

Windows NT

VC声明

用于获取进程相关时间

BOOL

WINAPI

GetProcessTimes(

__in HANDLE hProcess,

__out LPFILETIME lpCreationTime,

__out LPFILETIME lpExitTime,

__out LPFILETIME lpKernelTime,

__out LPFILETIME lpUserTime

);

参数:

hProcess:

为需要获取相关时间的进程句柄

lpCreationTime:

进程的创建时间

lpExitTime:

进程的退出时间

lpKernelTime:

进程在内核模式下的所有时间

lpUserTime:

进程在用户模式下的所有时间

返回值:

调用成功返回 1 ,失败则返回 0

关于 FILETIME 结构的说明:

typedef struct _FILETIME {

DWORD dwLowDateTime;

DWORD dwHighDateTime;

} FILETIME, *PFILETIME;

参数:

dwLowDateTime:

时间的低32位

dwHighDateTime:

时间的高32位

随便看

 

百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/27 13:23:51