All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 eVC - SleepIntercept (RQONOFF Handling)
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 22 Dec 2003 :  14:23:23  Show Profile  Email Poster
SleepIntercept Utility Class

SleepIntercept is a helper class that allows your application to do work after an RQONOFF (suspend) interrupt occurs and before the system actually goes to sleep.

The sample class intercepts the RQONOFF event and calls your own callback procedure (a sample application is included).

To use the class you *must* be using a CE 4.x ADS device and you must set the following registry key:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Power]
"VddPwrOffFromApps"=dword:1


This code can be modified to work with CE 3.0 by changing the reg keys. For more information see the On_Off.exe sample application (Graphics Master CE 3.0 only).

Key APIs Used

CreateThread
ExitThread
CreateEvent
WaitForSingleObject
RegOpenKeyEx
RegQueryValueEx


Lines of Code: 116


Download (EXE and source)
Rev 1 - Dec 22, 2003 (7k zip).



Edited by akidder 11-Oct-2006: Correct syntax of registry key

haka

31 Posts

Posted - 01 Dec 2004 :  10:20:49  Show Profile  Email Poster
I can't get this to work on Bitsy Plus,
Should it work on Bitsy Plus ?
Go to Top of Page

haka

31 Posts

Posted - 21 Aug 2006 :  07:44:38  Show Profile  Email Poster
Hi,
Should this sample work on Bitsy Xb ?
Go to Top of Page

akidder

1519 Posts

Posted - 21 Aug 2006 :  10:57:20  Show Profile  Email Poster
Funny you should mention it. We were just looking at this code on Friday using the BitsyX. I think there may be an issue with the VDDPOWEROFF event (looks like it may be set instead of being pulsed, causing it to retrigger in some applications).

I'm going to lock this topic, as it's intended to be a reference page, but we'll give an update here tomorrow about the status. If you want to email us directly with details of what you're observing, that may help, too.
Go to Top of Page
  Topic  
 Forum Locked  Topic 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