Hello! For example, there is a program called: prog_1.1.exe
nt APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { if ( CreateMutex(NULL, FALSE, _T("prog_1.1.exe")) )//то есть уже запущено if ( GetLastError() == ERROR_ALREADY_EXISTS ) { //действия если запущена } while(true); }
How to make it so that if I run a second copy of this file, then it should stop executing the first copy?
And the second question is how to run it on a computer connected to the network if there is a shared folder?
Could you give me an example? code ...