>...is there a way to cause my app to always start when the
>palm starts? Is this shared library something that I need for this?
You don't need a shared library for that. Here's a snippet that will launch your app
at reset. This goes in the command switch statement of your PilotMain procedure:
-----
case sysAppLaunchCmdSystemReset: // System has been reset
{
UInt resDBCardNo;
LocalID resDBID;
// Set an alarm so we can launch ourselves later
DmOpenDatabaseInfo(DmNextOpenResDatabase(NULL), &resDBID, NULL, NULL, &resDBCardNo,
NULL);
AlmSetAlarm(resDBCardNo, resDBID, 0, TimGetSeconds(), false);
}
break;
case sysAppLaunchCmdAlarmTriggered: // Alarm has triggered
{
UInt resDBCardNo;
LocalID resDBID;
// Launch our application
DmOpenDatabaseInfo(DmNextOpenResDatabase(NULL), &resDBID, NULL, NULL, &resDBCardNo,
NULL);
SysUIAppSwitch(resDBCardNo, resDBID, sysAppLaunchCmdNormalLaunch, NULL);
}
break;
-----
Basically, the idea is that when your app gets called with the reset action code, you
set an immediate alarm so you will be called when applications have started running.
When you get called for the alarm action code, you launch your application.
Bill
Cyclos