> RE: To check if MemPtr is valid ?

The short answer is "you can't". Just because the contents appear valid
doesn't mean they really are.

> If I know that it belongs to a particular heap, I can use MemPtrHeapID,
> but for a random value it will crash, unless I use Try+Catch, which 
> I would like to avoid.

Just because the Memory Manager routines don't fail doesn't mean they
worked. They're just doing a few sanity checks to see if anything looks
obviously bad. Depending on the contents of memory, they could be fooled.
It's up to each application to only reference known valid MemPtrs and
MemHandles.
-
Danny

-- 
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