Sunday, July 12, 2009

How to reterive system idle time using c++ in window XP/2000?

i got some API like getIdletime(), getlastinput info


but those a not supported in windows 2000/XP

How to reterive system idle time using c++ in window XP/2000?
You can likely use EnumProcesses to get a list of all the processes, find the system idle process, then do an OpenProcess and call GetProcessTimes on the resulting handle.





All of these functions are in the Windows platform SDK.
Reply:Check here http://planet-source-code.com/ for the code.


No comments:

Post a Comment