"Alagesh" <[EMAIL PROTECTED]> wrote in message
news:3270@palm-dev-forum...

>     tempRecH = MemHandleNew( 3K );
>     bufferH  = MemHandleNew( 8K );
>     if(bufferH != NULL && tempRecH != NULL)
>     {
>        tempRecP = MemHandleLock(tempRecH);
>        buffer = MemHandleLock(bufferH);
>     }
>
> Memory to hold the actual content and the buffer are allocated as above ,
> But when I do the write operation  as follows ,
>
>   DmWrite ( tempRecP, tempTxtInd, &buffer[i], sizeof(char) ) ;
>
> within a loop until i becomes equal to 3K,  I get the follwing error :
> "DataMgr.c, Line 4943, DmWriteCheck failed".
> Can anyone point me on what went  wrong.

When copying to an area on the *dynamic* heap, use MemMove instead of
DmWrite. DmWrite would be applicable if tempRecH was allocated on the
*storage* heap with something like DmNewHandle or DmNewRecord.

Stephen Best
Bitware Australia



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to