Basically, this is a system preference/system event type thing.  You can
set the preference using PrefSetPreference( deviceLocked, true ); ,then 
send the event character hardPowerChr to the event queue with a function 
like so:

static void AddKeyDownEvent( Word character )  
{       
        EventType theEvent;                // Create the key down event 
        theEvent.eType = keyDownEvent;  theEvent.data.keyDown.chr =
character;
        theEvent.data.keyDown.keyCode = 0;
        theEvent.data.keyDown.modifiers = commandKeyMask;
        EvtAddEventToQueue(&theEvent); // Add the event to the event queue 
}       

I don't think there is a function anywhere for shut down/lock...might be a
feature or something.  I've learned to work from my header files as a 
reference...the documentation doesn't let you get creative enough sometimes.
//* Rus Daniel Nesse 
>-----Original Message-----
>From: "L�fving, Christer" [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 18, 2000 7:52 AM
>To: Palm Developer Forum
>Subject: Function for lock device
>
>
>Hi,
>
>I have searched the documentation, but can't find any
>function to evaluate the Security option 
>'Turn Off & Lock Device' from my code.
>Any hints?
>
>
>Regards
>
>Christer 
>
>-- 
>For information on using the Palm Developer Forums, or to 
>unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to