mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
create installer mutant
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3033 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -139,6 +139,24 @@ INT WINAPI WinMain(
|
||||
if (PhGetIntegerSetting(L"EnableKph") && !PhStartupParameters.NoKph)
|
||||
PhInitializeKph();
|
||||
|
||||
// Create a mutant for the installer.
|
||||
{
|
||||
HANDLE mutantHandle;
|
||||
OBJECT_ATTRIBUTES oa;
|
||||
UNICODE_STRING mutantName;
|
||||
|
||||
RtlInitUnicodeString(&mutantName, L"\\BaseNamedObjects\\ProcessHacker2Mutant");
|
||||
InitializeObjectAttributes(
|
||||
&oa,
|
||||
&mutantName,
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
NtCreateMutant(&mutantHandle, MUTANT_ALL_ACCESS, &oa, FALSE);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
dbg.ClientId.UniqueProcess = NtCurrentProcessId();
|
||||
dbg.ClientId.UniqueThread = NtCurrentThreadId();
|
||||
|
||||
Reference in New Issue
Block a user