"Richard Hartman" <[EMAIL PROTECTED]> wrote:

> If you only want to read (and not alter) the record, you can
> get the handle to it with DmQueryRecord().  This does not
> "lock" the handle, and you do not need a corresponding
> release.

Let's be careful with terminology. This is all confusing enough for 
newbies as it is, without muddying the waters all the more by misusing 
terms. "Lock" and "release" should not be paired.

DmGetRecord doesn't lock a handle; it simply marks a database record 
busy, and returns the handle. To use the handle, you must lock it with 
MemHandleLock.

In other words, to follow your suggestion of "pairing" functions:
    allocate <-> free     (MemHandleNew  <-> MemHandleFree)
    lock     <-> unlock   (MemHandleLock <-> MemHandleUnlock)
    busy     <-> release  (DmGetRecord   <-> DmReleaseRecord)

--
Roger Chaplin
<[EMAIL PROTECTED]>

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