summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b24b8f4)
- 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
HANDLE hProcess;
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
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;
/* Initialize global variables */
hInst = hInstance;