Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: paramErr from LaunchApplication?



It sounds like this code works for an application located on one disk image, but fails for the same application located on a different disk image.

It could be a "FSSpecs aren't valid across processes in OS X" problem. Have you tried using LSOpenFSRef() (in LaunchServices.h) instead of LaunchApplication()? I guess you'd also want to make sure that you have read / write / execute permission on each disk image.

- Paul


On Monday, August 18, 2003, at 02:45 PM, Laurence Harris wrote:

I'm baffled too, but I'm baffled because I only see one call to
LaunchApplication . ;-)

On 8/18/03 4:46 PM, Glenn L. Austin didst favor us with:

OK, I am *totally* baffled on this one!

Platform: Mac OS X 10.2.6, 768MB RAM

Wrinkle: Launching applications from different disk images.

Code:

if (isMacApplication(&theAppFSSpec))
{
LaunchParamBlockRec pb;

pb.launchAppSpec = &theAppFSSpec;
pb.launchAppParameters = NULL;
pb.launchBlockID = extendedBlock;
pb.launchEPBLength = extendedBlockLen;
pb.launchFileFlags = 0;
pb.launchControlFlags = launchContinue | launchNoFileFlags |
launchUseMinimum;

err = LaunchApplication(&pb);

if (err == noErr)
{
// Do stuff while running
}
}

For some reason, the first LaunchApplication succeeds, but the *second*
LaunchApplication call returns paramErr.

What am I missing here?


Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: paramErr from LaunchApplication? (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.