Re: Prevent to exec second copy of application
- From: Martyn Russell <martyn russell bt com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Prevent to exec second copy of application
- Date: Sun, 14 Nov 2004 17:55:32 +0000
On Sat, 2004-11-13 at 14:41 +0300, jakonda jakarta wrote:
Helo, I try to force my application to be only one on display,
I mean if somebody do
$./my-program
OK!
$./my-program
There is another copy. Use it
I know that on Windows you can stop using multiple instances of an
application by creating a Mutex:
HANDLE mutex = NULL;
mutex = CreateMutex (FALSE, NULL, "My App Name");
When you quit, you then need to release it:
ReleaseMutex (mutex);
Also, when you go to install your app, if you happen to be using Inno,
you can use the following:
[setup]
AppMutex=My App Name
To make sure it doesn't un/install whilst running.
--
Regards,
Martyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]