Reputation: 73
I am working on new project. Here in this new project I need to run only one instance of application at one time. Not two instance of application should run. If user tried to open another instance that time it should give error.
Can anybody help me out. how can I achieve this.
Thank You
Upvotes: 2
Views: 935
Reputation: 514
I found this link. This link is basically about to use CreateMutex for the same issue.
According to this link, you can use "CreateMutex" to find if your app is currently running. When your application tries to run 2nd application, it will get error. There are some sample codes for this. I hope this helps.
Upvotes: 2