Thanks for idea Jonathan.
I tried to call
MemPtrSetOwner(cmdPBP, 0);
before SysUIAppSwitch(cardNo, dbID, sysAppLaunchCmd_AutoUpdateData, cmdPBP);
and it works correctly.
----- Original Message -----
From: Jonathan Carse
To: Palm Developer Forum
Sent: Thursday, January 31, 2008 2:31 PM
Subject: Re: Trouble with passing data to my application
I know very little about Palm OS (and my frequent posts will testify on that).
I know nothing of the alarm system.
But I do know that passing a pointer to a local function variable is never
good unless you use it before the stack frame returns from that local function.
If the call to SysUIAppSwitch() just does something and then returns, and
assuming you have nothing that keeps the execution in the same function, the
variable autoUpdateParams will be taken off the stack and therefore any pointer
to it will be invalid.
I may be way off here, but a red light always comes on in my head every time
a pointer to a local variable.
Forgive me if I'm wrong.
2008/1/31, Oleg Ignatov <[EMAIL PROTECTED]>:
Hello All.
I have some trouble with passing data to my application.
I set alarm for my specific needs.
Then from any applications I recieve this alarm notification and if my app
is not activated call:
SysAutoUpdateDataParamType autoUpdateParams;
autoUpdateParams.ref = someParam;
SysUIAppSwitch(cardNo, dbID, sysAppLaunchCmd_AutoUpdateData,
&autoUpdateParams);
passing parameters in the forth arg.
But when I recieve sysAppLaunchCmd_AutoUpdateData sublunch code and try to
retrieve parameters from the parameter block:
UInt32 cmdPBPRef = ((SysAutoUpdateDataParamType*)cmdPBP)->ref;
I have got some garbage instead my someParam.
What do I do incorrectly?
Thanks in advance.
___________________
Oleg Ignatov
-- For information on using the ACCESS Developer Forums, or to unsubscribe,
please see http://www.access-company.com/developers/forums/
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/