Hi all,
I am having difficulties with a few mem handles. I have declared them,
initialised them for the correct amount of memory. I then lock them.
They each are independant of one another. However, when I unlock them
after I have performed a couple of MemMoves into the memory space of the
MemHandles, it gives me a message of chunk underlocked.
I tested each of the memhandles to be non 0, and I tested each of the
pointers generated to be non 0. What is going on?
Thanks.
Here's a snippet of the code:
Frag32 = MemHandleNew((UInt32)(sizeof(myHeader) + 2));
tempBody.IP_Packet_ID = 2;
tempBody.Segment_ID = 1;
packet_type = IP_PACKET;
tempPtr = (UInt8 *)MemHandleLock(Frag32);
MemMove(tempPtr, &packet_type, 1);
MemMove(tempPtr+1, &tempBody, sizeof(tempBody));
MemMove(tempPtr + 1 + sizeof(tempBody), &Fragments3_2[0], 2); /*
UInt8 array declared earlier*/
MemHandleUnlock(Frag32);
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/