At 9:54 PM +0100 16-03-00, Vitaly Kruglikov wrote:
>How about something like this to avoid additional complication:
Not bad... but:
Why not just ALWAYS call MemPtrUnlock.
It's actually faster than MemHandleUnlock (by a VERY tiny amount).
Okay, technically you still have to call DmReleaseResource. But note that
in every OS release to date, DmReleaseResource has been a no-op. :-)
If you're concerned about having to call DmReleaseResource for forward
compatibility reasons, then you must also call it for ROM apps as well as
RAM apps. And in that case you're pretty much stuck with having to do
another DmGetResource to get the handle.
--Bob
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html