Re: Dis-Allowing Multiple Instances of an Application

2008-03-04 Thread Julien Jalon
Do something like: CFMessagePortRef identityPort = CFMessagePortCreateLocal(NULL, CFSTR(" com.mycompany.myapplication.unique"), NULL, NULL, NULL); if(identityPort == NULL) { printf(stderr, "Application is already launched\n"); exit(1); } // else keep this port around, it will be destroyed o

Re: Dis-Allowing Multiple Instances of an Application

2008-03-04 Thread Kyle Sluder
On Tue, Mar 4, 2008 at 3:27 AM, ADIL SALEEM <[EMAIL PROTECTED]> wrote: > I have made an application in Cocoa. From GUI it's multiple instances can > not be launched. However, from command shell, multiple instances of the > application can be launched. This isn't how apps are supposed to be lau

Dis-Allowing Multiple Instances of an Application

2008-03-04 Thread ADIL SALEEM
Hi, I have made an application in Cocoa. From GUI it's multiple instances can not be launched. However, from command shell, multiple instances of the application can be launched. I want to run only one instance of my application at a time. It should not be able to create multiple ins