All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 eVC - Trapping the PWROFF event
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

akidder

1519 Posts

Posted - 04 Apr 2002 :  15:58:43  Show Profile  Email Poster
On_Off.exe (Trapping the PWROFF event)


Note that this application was written for the Graphics Master and includes driver references that will not work on other platforms. See topic 1292 for a sample that works on other platforms.


In some cases, your application may need to complete some operations before putting the system to sleep (eg. flush data to flash disk, prepare digital I/Os, etc). This eVC application illustrates how to trap the PWROFF event issued when the RQONOFF signal is toggled (the registry entry must be enabled).

This application demonstrates trapping the PWROFF event, polling the RQONOFF signal and shows how quickly you can put the system to sleep. It uses the LED to indicate the current state of the app and the debug port for additional messages.

The exe included was built for and used on the Graphics Master. You can easily change the application to work with Graphics Client Plus and Bitsy by changing a single indexing variable.

Key APIs Used

keybd_event
VK_OFF
CreateFile

Lines of Code: 227


Source Download
Rev 1 (61k zip)

Edited 31-Mar-2002 by ctacke: Added key APIs and lines of code (LOC)
Edited 11-Oct-2006 by akidder: Indicate that this application is only for Graphics Master

akidder

1519 Posts

Posted - 29 May 2003 :  11:04:06  Show Profile  Email Poster
This application can be modified to trap the VDDPWROFF event available in some systems (e.g. Graphics Master).
Go to Top of Page

ctacke

877 Posts

Posted - 22 Dec 2003 :  14:25:32  Show Profile  Email Poster
For another example on running your own code after the RQONOFF interrupt and before the system goes to sleep, see the SleepIntercept Utility Class.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000