• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Who's launching me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Who's launching me? (From: "Paul J. Lucas" <email@hidden>)
 >Re: Who's launching me? (From: "John C. Randolph" <email@hidden>)
 >Re: Who's launching me? (From: Finlay Dobbie <email@hidden>)

  • Prev by Date: Re: CoreImage: Newbie can't find memory leak [SOLVED
  • Next by Date: problem with addTrackingRectangle
  • Previous by thread: Re: Who's launching me?
  • Next by thread: Re: Who's launching me?
  • Index(es):
    • Date
    • Thread