site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nIZe9LGfRW8F/Iz9HReNcvUm4EozR5PP+TnS15Mwofc=; b=vLUJBz8QSA80Mi4jHOmE4Qelewz6lxe/31Rpv5aFNNqt5LP1ZA8yyBKKB8qXhuJS4J cuov/QZb7hc5+/Xy6ZqfIm/CnIlv+Y5w6ziTbJhGGNp+AXUIc/j0/qmB5IRAdS3wc0ZM OOjI0fMZ7ERef8iLkni32AsPY6g2f5rsPkwIE= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=gnmpr8rO6lI7soDAYpUHnQXwjOSHG/Vnk44jjKIP+aUIqa/vfcN8IvkIssfRHwHV9l os0OHfpwq6T1jtldlkhuOVp1pc4qPm7rJmQKQTx2fgsZhSwmI+/k1E4uJL8UMn/QQM8g L7CMkSsb6mlDaAITxkQTDSclXIqy7t7AipYbg= Thanks. 1. The application for which I have to find out the path is a GUI I do not know what technology was used to write, I think it does not matter. I want to find out the path of this application in my another application 2. Yes you are right, I can see in Activity Monitor but I want to find out the programatically. I want to do both activity in another application and it is C++ Tool (Command line utility) and will run as daemon. Regards rksinghal On Mon, Dec 15, 2008 at 4:30 PM, Jean-Daniel Dupas <devlists@shadowlab.org> wrote:
Le 15 déc. 08 à 11:45, Rakesh Singhal a écrit :
Hi all,
I think these are general queries still I am not aware of answer of following queries:
1. I create a package for MyApp application and option is given to user to change the path to install the MyApp application. Now in my code, I want to find out the path of MyApp application so that I can access it. So how to get the path of application?
Are you taking about Cocoa App, Carbon App, BSD tool ? For Cocoa App, use NSBundle API For Carbon App use CFBundle API (works with Cocoa too) For BSD tool, I think _NSGetExecutablePath() will do the trick (<mach-o/dyld.h>)
2. MyApp is running on my system and I need to find out that is it running or not then how to find out?
What do you mean by "find out" ? The simple answer is have a look at activity monitor but you may want to determine it programatically.
Same as above. Which kind of App ?
Cocoa: Iterate over -[NSWorkspace launchedApplications] Carbon: Use Process Manager API. BSD: use sysctl.
http://developer.apple.com/qa/qa2001/qa1123.html
Thanks in advance.
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com