> Paul Nevai <[EMAIL PROTECTED]> wrote:
> 
> > # as far as I know a Palm app. can't delete itself !!!
> > 
> > Why not. I could create another application whose only job is to delete the
> > 1st one and then it could launch that one. Of course, then we are stuck with
> > the other one. Use induction. Best regards, Paul
> 
> How about this: the app that wants to delete itself contains a function 
> that deletes all the databases it has created, along with any 
> preferences, then deletes its own program database, then calls 
> SysReset().
> 
> When it wants to actually do the deed, it uses MemPtrNew() to allocate 
> enough memory to hold said function, then copys that function's code 
> into the newly allocated memory, then jumps to it. The SysReset() will 
> reclaim the memory that was allocated by MemPtrNew(), and thus the app 
> will be gone without a trace.

  wont the database still be open when you do the jump? :) you will
  probably have to close the database inside the code you jumped to.

az.
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 26 10 16 11

Reply via email to