Hi Aaron,
I believe the owner ID is used by PalmOS to identify who has allocated
any given memory block. This is used to cleanup upon application exit,
avoiding memory leakage.
I don't have the docs here right now - I'm on vacation :-) -, but if I
remember right, passing a launch code of 0 is like using the application
as a subroutine. You don't have global space allocated for you, nor
stack space by the way.
In your situation, I'd probably use the normal launch code. I don't know
if you can use SysUIAppSwitch, but that would be the safest way.
SysUIAppSwitch will post an appStopEvent, though, causing the calling
app to close (if it doesn't it will never launch the other app).
Sergio Carvalho
Aaron Ardiri wrote:
> hi!
>
> i have this really strange thing going on in my program, and
> it have me stuffed.
>
> i use SysAppLaunch to start a program, which i generate on the
> fly (my new protection scheme - the one using rc4 level
> encryption i discussed a long time ago) - which does work! :)
>
> when i launch my new program.. i *HAVE* to do this:
>
> ---
> launchCode = sysAppLaunchFlagNewStack | sysAppLaunchFlagNewGlobals;
> SysAppLaunch(cardNo,dbID,launchCode,cmd,cmdPBP,&err);
> ---
>
> but the documentation says that you should pass '0' as the
> launch code.. i do this, and it crashes (giving me 'the program
> accessed global data' or something).. hence i need to make sure
> it has its' own globals, and stack (which makes sense)
>
> after 13 runs, i run out of OwnerID's!!
>
> what is this OwnerID? !! all the documentation says it is
> 'for system use' only.. and it does not tell me anything..
>
> - i am writing system level code, so i would LOVE to know
> what the hell it is, this is where the documentation is
> very very very very bad..
>
> search the FAQ's, Knowledge Base - NOTHING..
>
> and how does it get affected by the 'SysAppLaunch' call? i
> have use SysAppLaunch, as my program needs to remove the
> temp. database it creates once the program is complete.
>
> any ideas people? this problem has been over my mind ALL day.
>
> someone had to write it.. and i hope that person is listening
> to this email! :)
>
> cheers.
>
> az.
> --
> Aaron Ardiri
> Lecturer http://www.hig.se/~ardiri/
> University-College i G�vle mailto:[EMAIL PROTECTED]
> SE 801 76 G�vle SWEDEN
> Tel: +46 26 64 87 38 Fax: +46 26 64 87 88
> Mob: +46 70 352 8192 A/H: +46 26 10 16 11