[futurebasic] Launching Applications

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: Jamin <benjamen@...>
Date: Wed, 26 Nov 97 11:43:44 +1000
This one is a difficult...

I am using the following routine to launch an application.  On a 68k Mac 
the code will launch another 68k Application, BUT on a PowerMac it only 
launches 68k applications, not native or fat apps.  The routine returns 
no error when it fails to launch a fat app.  In MacsBugs via "procinfo", 
you can see the app does exisit for a few seconds, but then it dies 
without error.  The fat app is not at fault, as I have tried launching 
Acrobat, Photoshop etc, all with the same results. I am sure that my 
parameter block is correct, because launching a 68k app works.  

I re-wrote the whole routine & parameter block in C, then compiled it 
into a code resource. If you call the code resource from a C app it 
works, but from a FB app it fails as before ?

All help welcome


--- Cut Here for very small lunk 'o code ----

LOCAL FN LaunchApplication (launchPtr&)
  `  SUBQ.L    #2,sp                    ;clear space for osErr
  `  MOVE.L    ^launchPtr&,-(sp)        ;push fileSpec ptr on stack
  `  DC.W      $205F,$A9F2,$3E80        ;trap number
  `  MOVE.W    (sp)+,^osErr%            ;D0 = osErr
END FN = osErr%