View Single Post
Old 15th June 2019, 16:09   #2  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quite easy to do with the Win32 API:

Code:
::CreateMutex(NULL, TRUE, "__my__app__single__instance__lock__"); //make sure that string is unique

if (::GetLastError() == ERROR_ALREADY_EXISTS)
{
 printf("One instance of this program is already running");
 return;
}
Should be easy to transpose to C#.

BTW, first hit on Google:https://stackoverflow.com/questions/...app-in-c-sharp
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 16th June 2019 at 11:06.
Groucho2004 is offline   Reply With Quote