On 1/25/07, Bruce Waters <[EMAIL PROTECTED]> wrote:
>
>  After a crash, I want my app on next launch to programmatically close any
> of its databases left open. There does not seem to be any good way to do
> this selectively -- that is, no way to relate the LocalID of a database
> found to be open still, to the DmOpenRef returned by using
> DmNextOpenDatabase in a loop. So I tried programmatically closing all open
> databases using the latter in the loop, with a DmCloseDatabase call for each
> returned DmOpenRef that was non null. But there was no way to limit this to
> just my app's databases, and it didn't seem to work anyway - well, it
> crashed the CodeWarrior IDE each time I tried (my debug target is a real
> Dana machine), and using FileZ afterwards I discovered the open databases
> that appeared to be being closed as I stepped through in the debugger were
> still open.
>

On a crash, why not just reset the device?  No databases are left open after
a device reset, so it should be OK to then run your program again.

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

Reply via email to