Hello all.
I need to have my application be notified EVERYTIME a HotSync is
completed. So, per the manual, I am trying to register
sysNotifySyncFinishEvent. I have put the source below. ExecutedHotSync()
just writes out a file so I know the HotSync completed. I also put some
sound in so I can hear when events are called. It seems that
SysNotifyRegister() gets called because I hear the sound. But then I do a
hotsync but I don't get my second sound, i.e., I am not getting
sysNotifySyncFinishEvent event. Where should I be doing my
SysNotifyRegister(). Is this correct? Can anyone help. Is this close or way
off?
static UInt32 StarterPalmMain(UInt16 cmd, MemPtr /*cmdPBP*/, UInt16
launchFlags)
{
.....
.....
.....
switch (cmd)
{
case sysNotifySyncFinishEvent:
for(int i = 0; i < 15; i++)
{
SndPlaySystemSound(sndError);
SysTaskDelay(15);
}
ExecutedHotSync();
break;
case sysAppLaunchCmdNormalLaunch:
LocalID lID = 0;
UInt16 uiCard = 0;
SysCurAppDatabase(&uiCard,&lID);
if(lID)
{
for(int i = 0; i < 15; i++)
{
SndPlaySystemSound(sndError);
SysTaskDelay(1);
}
SysNotifyRegister(0, lID,
sysNotifySyncFinishEvent , NULL, sysNotifyNormalPriority, NULL);
}
error = AppStart();
if (error)
return error;
FrmGotoForm(MainForm);
AppEventLoop();
AppStop();
break;
default:
break;
}
Ralph Krausse
Expo International, Inc.
110 Shawmut Road
Canton, MA 02021
telephone (781) 821-6653
www.expo-intl.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/