Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

single application instance

0 views
Skip to first unread message

Bob Allen

unread,
Nov 28, 2001, 7:17:08 PM11/28/01
to
How do i check for an instance of my application already running.ie: only
haveing one instance running at a time allowed.

Thanks,
Bob :)


Nicholas Paldino [MVP]

unread,
Nov 29, 2001, 9:28:39 AM11/29/01
to
Bob,

I thought that this is something that the Application class should pick
up, but it isn't. Oh well.

What you can do in the meantime is set up a Mutex when your app runs.
If your app detects that the (named) mutex exists, then it exits, otherwise,
it creates the mutex and continues on it's merry way. Of course, make sure
to release the Mutex when you are done.

--
- Nicholas Paldino [MVP]
- nicholas...@exisconsulting.com

"Bob Allen" <b...@324pm.com> wrote in message
news:#$FFxsGeBHA.2144@tkmsftngp02...

Dan Tran

unread,
Dec 2, 2001, 7:53:04 PM12/2/01
to
Create a named semaphore. Who ever start first, locks the semaphor. The
later cann't lock it, which mean there already
an instance of you app running

Good luck.

-Dan

"Bob Allen" <b...@324pm.com> wrote in message
news:#$FFxsGeBHA.2144@tkmsftngp02...

0 new messages