in reply to Get computer idle time

I don't see anything in Win32 for this, and according to this article you need to create a DLL to hook into the system to do what you want. The link gives source code on how to do it.

Remember: There's always one more bug.