Actually, that *causes* a problem, since it leaves the handle locked. GuangHe
needs the full solution:
> ptr = MemHandleLock(recordH);
> offset = record.fields[note] - ptr;
> FldSetText (fld, recordH, offset, StrLen(record.fields[note])+1);
> MemHandleUnlock (recordH);
Note that the final MemHandleUnlock is *in addition* to the MemHandleUnlock
already at the end of the function he's looking at. Each call to MemHandleLock
needs to be matched with a call to MemHandleUnlock. The one that's already
there matches the one in AddrGetRecord. The one we're adding matches the call
to MemHandleLock we're adding.
-- Keith Rollin
-- Palm OS Emulator engineer
[EMAIL PROTECTED] on 07/11/2000 12:29:08 AM
Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
cc: (Keith Rollin/US/PALM)
Subject: Re: Question about MemDeref ?
Use
ptr = MemHandleLock(recordH);
hope this solves your problem.
GuangHe Pan wrote:
>
> Function "MemDeref" is used In Address.c (line 2054) as following:
>
> // Find out where the note field is to edit it
> ptr = MemDeref (recordH);
> offset = record.fields[note] - ptr;
> FldSetText (fld, recordH, offset, StrLen(record.fields[note])+1);
>
> When I copy above code to my application in PalmOS3.5, the function
> "MemDeref" doesn't work. the err code as following:
>
> "function has no prototype"
>
> MemDeref was defined in "MemoryPrvNew.h". But I can not find
> any documentaion about this function.
>
> How can I modify the above code? or which function I can use to
> replace "MemDeref".
>
> Thanks for your help
>
> -Rocky
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/