Here is what I have found (very recently) regarding flash memory. These
might help you.
If you open a database in read/write mode that is sitting in flash, the
operating system will happily and merilly let you do that without causing
an error. However, if you try to change anything in the database, you of
course will crash. Also, even if you DON'T change anything, you will crash
inside the DmCloseDatabase call. If you don't close the database, you will
still crash, because when your application exits, the OS automatically
closes all your open databases for you.
A suggestion for the Palm OS people: Please put the check outlined below
into the DmOpenDatabase and associated calls, and prevent the opening of
ROM databases in read/write mode.
In order to see if a database is in Flash, you must use the following test:
if (MemLocalIDKind(localID) == memIDHandle) {
// we are in RAM
} else {
// we ar in ROM
}
where localID is the LocalID of the database in question, which you will
have to get using a call like DmGetNextDatabaseByTypeCreator, since you
can't open the database first (because it will crash in ROM, as above).
Thanks,
Shannon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hands High Software
Award winning software for the Palm(tm) Computing platform
<http://www.handshigh.com/>
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~