[EMAIL PROTECTED] (Remo Hofer) wrote in <36922@palm-dev-forum>:

<snip>

>I solved it by testing, whether the localId of the database is a pointer
>or a handle, like this:
>
>  if (MemLocalIDKind(localId) == memIDHandle)
>    rom = false; else rom = true;

Thanks Remo!!  This worked great!!  

We tested it on the following:
POSE/PalmOS 2.0 - works
POSE/PalmOS 3.0 - works
POSE/PalmOS 3.3 - works
POSE/PalmOS 3.5 - works
Visor Prism/ PalmOS 3.5.2H1 with 8MB module - works

>
>Testing the heap flags, like the following code segment, does not work
>on PalmOS 2.0.5 (I tested it on on POSE and on the real device).

This is basically what we were using (note the past tense :-).  
Didn't work on POSE/PalmOS 2.0 for us.

>
>  if (MemLocalIDKind(localId) == memIDHandle)
>    heap = MemHandleHeapID(h); else heap = MemPtrHeapID(h);
>  ui = MemHeapFlags(heap);
>  if ((ui & memHeapFlagReadOnly) == memHeapFlagReadOnly) rom = true;
>    else rom = false;
>
>And anyway, in SDK 3.5 the heap flags aren't in the public distribution
>anymore. They used to be in "MemoryMgrPrv.h". So, I concluded, that both
>methods are not really documented, but the chances that the first method
>fails on a future system is smaller (at least not bigger) than the
>second method, which fails already on at least one OS version.

Thanks again all,

TeamSTARS
  Dick Gordon and Rick Kier





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

Reply via email to