简体   繁体   中英

GetIdletime in windows mobile using c#

Hi, I need to get the idle time of the device in one of my windows mobile app. I tried all the way i couldn't get it. could Any one post the code for it..

Thanks in advance.

To get it to work, you'll need the GetIdleTime() function from coredll.dll .

To access it you can use a P/Invoke command which is stated here :

[DllImport("coredll.dll")]
static extern int GetIdleTime ();

Also you should note that some devices don't support this functionality and return a MAXDWORD instead (see GetIdleTime() description in block Return Value).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM