I never found a way to block it, but you can register for the time change
system event and warn the user, capture the event, or possible even change
it back


In PilotMain:

LocalID dbIDP;
UInt16 cardNoP;

case sysAppLaunchCmdSystemReset:
  // Register this application to respond to TimeChangeEvent when the system
resets.
  SysCurAppDatabase (&cardNoP, &dbIDP);
  SysNotifyRegister(cardNoP, dbIDP, sysNotifyTimeChangeEvent, NULL,
sysNotifyNormalPriority, NULL);
  break;

case sysAppLaunchCmdNotify:
  // Respond to time change event and record in database.  No access to
global vars
  if (params->notifyType == sysNotifyTimeChangeEvent) {
    // notifyDetailsP contains a pointer to the num of seconds changed
    delta = (Int32*)params->notifyDetailsP;


In AppStart:

LocalID dbIDP;
UInt16 cardNoP;

// Register this application to respond to TimeChangeEvents
SysCurAppDatabase (&cardNoP, &dbIDP);
SysNotifyUnregister(cardNoP, dbIDP, sysNotifyTimeChangeEvent,
sysNotifyNormalPriority);
SysNotifyRegister(cardNoP, dbIDP, sysNotifyTimeChangeEvent, NULL,
sysNotifyNormalPriority, &runCode);


-Dave



"Davi Carvalho" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I have an aplication and I have to block the users from changing the date
on
> the palm ...
>
> How can I do this? Can I do this without any code? Or I need to do a code
> that do this?
>
> I has a code that I used on Palm OS 3.5 and worked well. But on palm OS 5
it
> does not work anymore.
>
> Any help?
>
> Thanks
> Davi Carvalho
>
>



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

Reply via email to