Getting idle time of system/os 
Author Message
 Getting idle time of system/os

I'm aware of the OnIdle function in windows apps, but what I'm curious about
is if there's an API or some method of retrieving the amount of time that
the system has been idle.  I'm assuming that this would be similar to that
of a screen saver that looks for keyboard and/or mouse activity and kicks in
when that time has passed a certain point.

Thanks in advance.

Paul



Sun, 16 Jan 2005 00:49:44 GMT  
 Getting idle time of system/os

Quote:
>I'm aware of the OnIdle function in windows apps, but what I'm curious about
>is if there's an API or some method of retrieving the amount of time that
>the system has been idle.

Paul,

While I've never used it myself to know for sure, have a look at
GetLastInputInfo().

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 16 Jan 2005 07:45:44 GMT  
 Getting idle time of system/os


Quote:
> >I'm aware of the OnIdle function in windows apps, but what I'm curious
about
> >is if there's an API or some method of retrieving the amount of time that
> >the system has been idle.

> Paul,

> While I've never used it myself to know for sure, have a look at
> GetLastInputInfo().

> Dave

This is exactly what I need, except it's only available in W2K.  I'm using
win98/nt4.0  Online MSDN:

Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Included in Windows NT 2000

I couldn't even find it documented in my MSDN.  It showed up in the
intellisense global namespace, but then on compile, claimed it wasn't part
of the global namespace.

I'll keep digging.  I would think that there has to be something.

Paul



Sun, 16 Jan 2005 18:58:24 GMT  
 Getting idle time of system/os

Quote:
>> While I've never used it myself to know for sure, have a look at
>> GetLastInputInfo().

>This is exactly what I need, except it's only available in W2K.  I'm using
>win98/nt4.0

Paul,

Someone else recently pointed out this MSDN article:

http://www.microsoft.com/msj/0200/c++/c++0200.asp

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 16 Jan 2005 20:16:39 GMT  
 Getting idle time of system/os


Quote:
> >> While I've never used it myself to know for sure, have a look at
> >> GetLastInputInfo().

> >This is exactly what I need, except it's only available in W2K.  I'm
using
> >win98/nt4.0

> Paul,

> Someone else recently pointed out this MSDN article:

> http://www.microsoft.com/msj/0200/c++/c++0200.asp

Thanks, David.

Just before I read your response, I found a codeproject article which looked
very similar, but I didn't have a chance to test it or work it out.  Your
linked article *seems* more concise, so I'll use it.

Thanks a bunch!

Paul



Sun, 16 Jan 2005 21:56:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to get system idle time or get notified after the system being idle for an extended time

2. How to get system idle time or get notified after the system being idle for an extended time

3. System Idle time

4. System Idle Time modification...

5. system idle time

6. System Idle Time modification...

7. How to detect system idle time?

8. How to determine system idle time without hooks?

9. Monitoring System Idle Time

10. execute on system idle time

11. Get system idle time

12. Reading system time in Xenix OS

 

 
Powered by phpBB® Forum Software