Re: Who's launching me?
Re: Who's launching me?
- Subject: Re: Who's launching me?
- From: "Sean McBride" <email@hidden>
- Date: Wed, 15 Feb 2006 10:19:42 -0500
- Organization: Rogue Research
On 2006-02-13 00:07, Finlay Dobbie said:
>> > Is there any way for an application to know what other
>> > application launched it?
>>
>> Check the UNIX manual pages for getpid() and getppid().
>
>Applications launched via Launch Services are all children of the
>window server, so that won't work.
Although the best solution for the OP seems to be AppleEvents, if one
did want to know which app launched their app, one can use the
ProcessInformationCopyDictionary() API and look at the "ParentPSN" key
in the returned dictionary.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden