Any ideas what would cause MemHandleResize to throw a fatal exception ?
I have confirmed I am resizing it from 46 bytes to 83 bytes. I resize it
several times using the same code and it works fine. The handle is still
the same when it fails.
Here is my resizing code.
StringMemSize += len +1 ; // calc new memory length
err = MemHandleResize (hListStringArray,StringMemSize); // resize it
pListStringArray = (char*)MemHandleLock(hListStringArray); // lock it
MemSet ((pListStringArray + WriteOffset), len ,'\0'); // clear it
StrCopy ((pListStringArray + WriteOffset), tempDTC); // copy it
MemHandleUnlock(hListStringArray); // Unlock it
WriteOffset += len +1; // calc new offset
It definetly fails on the MemHandleResize. According to the reference
manual, MemHandle Resize should never fail.
A point that may or may not have anything to do with it is that the handle
value is 0x8000. It doesnt change between calls to the above code. The only
thing I can think of that would cause the Fatal Exception is a bad handle
passed.
Can anyone shed some light?
Thanks,
Mike
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/