mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 08:25:53 +00:00
Gabriel Ilardi (gabrielilardi@hotmail.it)
- Allow only one instance of Task-Manager to be run at the same time See issue #3976 for more details. svn path=/trunk/; revision=39353
This commit is contained in:
parent
b24b8f4a23
commit
7091708541
|
@ -51,6 +51,12 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
|
|||
HANDLE hProcess;
|
||||
HANDLE hToken;
|
||||
TOKEN_PRIVILEGES tkp;
|
||||
HANDLE hMutex;
|
||||
|
||||
/* check wether we're already running or not */
|
||||
hMutex = CreateMutexW(NULL, TRUE, L"taskmgrros");
|
||||
if ((!hMutex) || (GetLastError() == ERROR_ALREADY_EXISTS))
|
||||
return 1;
|
||||
|
||||
/* Initialize global variables */
|
||||
hInst = hInstance;
|
||||
|
|
Loading…
Reference in a new issue