Re: Better way than GetNextProcess()?
Re: Better way than GetNextProcess()?
- Subject: Re: Better way than GetNextProcess()?
- From: Bob Clark <email@hidden>
- Date: Tue, 22 May 2007 17:20:24 -0700
On May 22, 2007, at 2:32 PM, Kam Dahlin wrote:
I have a background only app that I need to be able to check to see
if it is running. I have been looking for some nice simple cocoa
calls for this, and [[NSWorkspace sharedWorkspace]
launchedApplications] looked like the way, but it doesn't show
hidden apps. In my research I have run across GetNextProcess() and
it seems to be able to do what I want. However, it is going to be
a bit more involved so before I go and make that call work I wanted
to ask here if there was a better way for getting a list of running
applications, including those that are hidden?
Hi Kam.
If your background-only app really is an application, linked to cocoa
and/or carbon frameworks, then iterating through GetNextProcess
should work. But if it's actually a BSD level program (a daemon or
something you'd often run from the command line) then it won't be
registered as a process that the Process Manager knows about. In that
case you'll have to iterate over all processes using sysctl().
http://developer.apple.com/qa/qa2001/qa1123.html
--Bob
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden