Click here to Skip to main content
15,898,222 members
Articles / Programming Languages / C#

Video tip C#: Ensure only one instance is running

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
2 Nov 2011CPOL 9K   2  
I would use a mutex object - using the process name might cause errors. Try "WaitOne" on the mutex - only the first process will be able to acquire it, and in the case of a failure, just exit.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions