Is there any attribute of a process that shows its lifetime (since it was loaded into memory)
and what are the WINAPI used to extract this information?
I want to be able to measure the lifetime of any process in the system
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you’re after the
GetProcessTimesfunction. You provide a handle to a process (you may need to have the appropriate security attributes), and also provide several pointers toFILETIMEstructs, which you can translate intoSYSTEMTIMEwithFileTimeToSystemTime. One of theFILETIMEobjects refers to the process’s creation time, which is probably the closest you will get to when the executable was loaded into memory.