Launching Applications
Quote from Forum Archives on November 25, 1997, 8:43 pmPosted by: benjamen <benjamen@...>
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
Jamin
--- Cut Here for very small lunk 'o code ----
CLEAR LOCAL
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%
Posted by: benjamen <benjamen@...>
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
Jamin
--- Cut Here for very small lunk 'o code ----
CLEAR LOCAL
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%