RE: MemPtr Help

2003-07-02 Thread Ken
Thanks - I should have seen that it was doing a pass by value. I do need to use the non-relocatable memory (MemPtr). Ken -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Re: MemPtr Help

2003-07-01 Thread Sebastian Cancinos
I´d do it like this void AAA(void) { MemHandle iBuffH; UInt8* iBuffPtr=NULL; UInt16 iLen; iBuffH = MemHandleNew(1); iLen = BBB(iBuffH); iBuffPtr = MemHandleLock(iBuffH); //do something with iBuffPtr MemHandleUnlock(iBuffH); MemHandleFree(iBuffH);

RE: MemPtr Help

2003-07-01 Thread dennis
iBuffPtr is passed by value: iLen = BBB(iBuffPtr); Therefore, even if BBB changes the value of iBuffPtr, the caller (namely AAA) will not see the change. One fix would be to pass a pointer to iBuffPtr. The above call would look like: iLen = BBB(iBuffPtr); and BBB would look like: