Steve Patt wrote:
> I don't speak assembler (well, I haven't for 20 years) but here's sample
> code for calling our PalmPrint application (sending it a string of
> characters to be printed). There really isn't that much to it;
> SysAppLaunch handles everything itself. I have a feeling you're trying to
> do too much.
>
> DWord resultP;
> LocalID dbID;
> Char theChars[32];
>
> dbID=DmFindDatabase(0,"PalmPrint");
> if (dbID) {
> StrCopy(theChars,"This is the string to print");
> err=SysAppLaunch(0,dbID,0,32768,theChars,&resultP);
> }
A potential flaw with the above code is that DmFindDatabase is not
particular about the >>>type<<< of database so far as I can gather from the
doco. (type could be code resource, library, application data...). Searching
for a database by an application's creator type using
DmGetNextDatabaseByTypeCreator should be more reliable.
Anyhow, I'm keen to understand Constantine's problem a little further. I
suspect that the problem is centered around using SysAppLaunch with launch
flags (sysAppLaunchFlagNewStack+sysAppLaunchFlagNewGlobals). My
understanding is that you cannot specify launch flags for SysAppLaunch (as
per doco. definition of the call). I use SysAppLaunch with no problem but I
don't use launch flags and neither does the above example.
Can anyone confirm that launch flags should absolutely not be used in
SysAppLaunch? I would certainly like to be able to specify a new stack for
when I call this function.
--
Christopher Hunt
Class Action Pty. Ltd.
Are you a time zone traveler that owns a Palm(tm) connected organizer?
Check out http://www.classactionpl.com/TimeTraveler/index.htm