Okay,

Eventually found this one. 

The Codewarrior code was mapping the cmdPBP to the correct structure using 

   mPowerCtx = (TmPowerCtx)cmdPBP

which worked fine for the Codewarrior code but when this same structure was 
passed back in the callframe to SysUIAppSwitch it did not pass back correctly 
after the called application did a

  MemPtrSetOwner(mPowerCtx,0);
  SysUIAppSwitch(yada yada yada)

On returning to the yada yada application it failed to correctly access the 
cmdPBP - it could actually read it fine but the emulator (bless its little 
cotton sox) threw lots of error reading unowned chunk type messages (that lazy 
slob simulator said nothing). Anyway, the simulator/emulator would finally blow 
a gasket when trying to exit this app.

  Solution was to:

  mPowerCtx = MemPtrNew(sizeof(TmPowerCtx));
  MemMove(mPowerCtx,cmdPBP,sizeof(TmPowerCtx));

  instead of

  mPowerCtx = (TmPowerCtx)cmdPBP;

But I guess everyone else in the world knows this.

rgds


-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to