If I put a PRC as "/PALM/start.prc" on a SD card, it gets auto-launched
as soon as the card is inserted into my Palm device.  

Behind the scenes, as I understand it, this is what happens:
1) card is inserted
2) /PALM/start.prc is copied into the storage heap of the local device.
3) There are now two identical copies of start.prc -- copy A is on the
SD card, and copy B in storage heap.
4) The start.prc in storage heap is executed, thus completing the
auto-launch.
5) I play around in the auto-launched start.prc application, and then
when I'm done I switch to the launcher.
6) Copy B of start.prc is still sitting in the launcher.

Once the volume is unmounted (e.g., the card is removed), copy B of
start.prc will be removed from the storage heap (and thus, disappear
from the launcher).

I'd like to change this behavior a bit, and I wanted to run it by you
folks.  When I exit the auto-launched 'start' application, I want it to
be removed from storage heap immediately, so that it does NOT show up in
the launcher.  In other words, after step 5) above, start.prc IS NOT
sitting in the launcher; rather, it's gone forever.

The only way I can think to do this is put some self-destruct code in
AppStop() of start.prc -- find itself in DmNextOpenDatabase (or would I
use DmNextOpenResDatabase?), set both the hidden & recycle bits, and
rest assured it will get blown away "real soon now."

Is there a more elegant solution?  Perhaps, a bit I can set that tells
VFS/Launcher to delete start.prc after it is exited?

Thanks!
-Jeff Ishaq






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

Reply via email to