Hi,
I am trying to come up with a reliable invalid pointer check.  I am assuming
that a valid pointer points to the beginning of a chunk (i.e. directly
allocated with MemPtrNew or MemHandleLock).
 
My first stab was to call MemPtrSize() on the pointer and compare the size
to what I expect.  This works okay, except on really whacky pointers the
routine displays a Fatal error message and resets.  I would like to
intercept the reset and handle the error myself.
 
I took a look at the OS4 source and there is a call PrvPtrCheck.  That
routine returns a MemChunkHeaderPtr.  I do not want the header but that
functionality without the error message is exactly what I am looking for.
 
Is there a call I can make to disable the error messages so that this call
will always return to me?
Is there another technique I can use to verify that my pointer is valid?
 
Thanks for any help,
Rob Mauck

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

Reply via email to