In article <9848@palm-dev-forum>, David Fedor <[EMAIL PROTECTED]> wrote:

> >> ... which databases in the list are in ROM and which ones
> >> in Ram. To the best of my knowledge, none of the parameters in
> >> DmDatabaseInfo give you this info.
> >>
> >Is it reasonable to asume that the local id of databases in ROM are
> >pointers and the one in RAM are handles? Or will this break in any of the
> >existing versions of the OS? Does it break on a foreseeable future OS?
> 
> I think it'd be wiser and more direct to call MemHeapFlags, which the docs
> say would have the memHeapFlagReadOnly bit set if appropriate.
> (MemPtrHeapID would get you the id to pass to MemHeapFlags.)
> 
> -David Fedor
> Palm Developer Support

Is there a known bug with the memHeapFlagReadOnly bit in some 
older systems? I'm asking this, because I once used the following 
code fragment, but got the wrong result for rom databases on the 
real device running PalmOS 2.0 (probably 2.0.5). The strange thing 
is, that it worked on the emulator with the 2.0 rom (debug and 
release) from the Provider Pavillon. Unfortunately I cannot 
reproduce this anymore, because I do not own a PalmPilot 
Professional anymore. Could It have something to do with the 
2.0.5 patch?

Remo Hofer

// the following works on poser (even with PalmOS2) 
// but not the real PalmPilot Professional (PalmOS2)

if (MemLocalIDKind(localId) == memIDHandle)
  heap = MemHandleHeapID(h); else heap = MemPtrHeapID(h);
ui = MemHeapFlags(heap);
if ((ui & memHeapFlagReadOnly) == memHeapFlagReadOnly) 
  rom = true; else rom = false;
-- 
Remo <[EMAIL PROTECTED]>                       /   /   /   /
----------------------------------------- -===(o<0=0=0=0=0=0=0=0>===-
Do NOT remove .nospam from email address!          \   \   \   \

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to