> SysNotifyRegister(cardNo, dbID, sysNotifyMenuCmdBarOpenEvent, > CommandBarOpenProc, sysNotifyNormalPriority, globalsP);
When you pass SysNotifyRegister the address of a callback routine, you have to ensure that it doesn't move until you unregister. You'll need to lock your code resource manually. Alternatively, you can use the launch code notification mechanism instead. Pass NULL for the callback address and handle the sysAppLaunchCmdNotify launch code. > I've isolated the problem to the globalsP pointer being freed or > moved when a call to MemHeapCompact() is called. I suspect your code is moving, and not your data. Chunks allocated with MemPtrNew should never be moved when the heap is compacted. -- Danny @ Palm -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
