Don't use PROCESS_ALL_ACCESS when it is not required (#2181)
* Request SDK neutral PROCESS_ALL_ACCESS * Use basic version test * Just ask for the access required
This commit is contained in:
parent
05bf0f9fb4
commit
5c8f87d4f8
|
@ -63,7 +63,7 @@ bool pjutil::TerminatedExistingExe()
|
|||
break;
|
||||
}
|
||||
}
|
||||
HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, lppe.th32ProcessID);
|
||||
HANDLE hHandle = OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, lppe.th32ProcessID);
|
||||
if (hHandle != nullptr)
|
||||
{
|
||||
if (TerminateProcess(hHandle, 0))
|
||||
|
|
Loading…
Reference in New Issue