- 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:
Colin Finck 2009-02-03 22:25:39 +00:00
parent b24b8f4a23
commit 7091708541

View file

@ -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;