On Thursday, August 1, 2002, at 12:10 AM, George Bassili wrote:

>  char * x;
>  x = MemPtrNew(1);
>  error = MemPtrResize(x, 29);
>
>
> when this executes, I get a memErrChunkLocked error.  How?  
> MemPtrResize is
> supposde to only work on a locked chunk.

Yes, but there's no guarantee that you'll be able to resize the locked 
chunk bigger (there could be something after the locked chunk). You can, 
however, make the locked chunk smaller:

char *x;
x = MemPtrNew(29);
error = MemPtrResize(x, 1);

In general, though, if you'll be resizing a memory chunk, make it a 
relocatable chunk.

Neil
--
Neil Rhodes                Available for contract programming
[EMAIL PROTECTED]    Co-author: Palm Programming: the Developer's Guide



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

Reply via email to