Hi,

My application is trying to lock the Palm (OS3.5, at
EarlyWakeupEvent) by doing the following:

   if (!PrefGetPreference(prefDeviceLocked) && PwdExists()) {
      PrefSetPreference(prefDeviceLocked, true);

      CreateKeyEvent(vchrLock);
   }

Now there are rare ocassions where the variable is set, but the Palm
is not locked. Only a softreset (afterwards the Palm is locked) or
entering the Security application (that locks the Palm then
instantly, too) fixes this interesting behaviour.
This does not happen always, but only from time to time.  After
sending the vchrLock key to the queue, there is sometimes another
event sent, but that should not affect the vchrLock, shouldn�t it?

An alternate approach would be to call the security application
directly by using 

   if (!PrefGetPreference (prefDeviceLocked) && PwdExists ()) {
      DmGetNextDatabaseByTypeCreator (true, &stateInfop,
                              sysFileTApplication, SECAPPID, true,
                                      &cardNo, &dbID);
      SysUIAppSwitch (cardNo, dbID, sysAppLaunchCmdSystemLock, 0);
   }

which has the disadvantage that the Palm is not only locked but
turned off as well. 

Any help is appreciated.

-- 
 Tschau,            ICQ 28589118
      Daniel        [EMAIL PROTECTED]
                    http://www.dseifert.de/        Berlin, Germany

-- 
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