how can a process detect a running instance of it

Login to reply to this topic.
Wed, 2008-06-11 20:49
Joined: 2006-08-13
Forum posts: 44

is there a simple way for a process to detect on startup if another instance of it is already in memory ?


Thu, 2008-06-12 03:52
Joined: 2008-06-11
Forum posts: 4
Re: how can a process detect a running instance of it

class RMutex might be ur choice.

Open it to check if there is already one exist, otherwise
Create it in the first process of ur binary since it is the very first one that is running.

Thu, 2008-06-12 03:54
Joined: 2008-06-11
Forum posts: 4
Re: how can a process detect a running instance of it

or TFindMutex, it is more lightweight I think.
Havent got time to try it yet.

Thu, 2008-06-12 11:00
Joined: 2004-11-29
Forum posts: 1232
Re: how can a process detect a running instance of it

You can use TFindProcess to search for any previous instances of your process.

  • Login to reply to this topic.