40 DPRINT(
"ExpDeleteMutant(ObjectBody 0x%p)\n", ObjectBody);
57 DPRINT(
"Creating Mutant Object Type\n");
60 RtlZeroMemory(&ObjectTypeInitializer,
sizeof(ObjectTypeInitializer));
62 ObjectTypeInitializer.
Length =
sizeof(ObjectTypeInitializer);
89 DPRINT(
"NtCreateMutant(0x%p, 0x%x, 0x%p)\n",
124 DPRINT(
"Initializing the Mutant\n");
142 *MutantHandle = hMutant;
170 DPRINT(
"NtOpenMutant(0x%p, 0x%x, 0x%p)\n",
206 *MutantHandle = hMutant;
227 IN ULONG MutantInformationLength,
244 MutantInformationLength,
250 DPRINT(
"NtQueryMutant() failed, Status: 0x%x\n",
Status);
268 DPRINT(
"Returning Mutant Information\n");
303 DPRINT(
"NtReleaseMutant(MutantHandle 0x%p PreviousCount 0x%p)\n",
348 if (PreviousCount) *PreviousCount = Prev;
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
#define ExGetPreviousMode
#define KeGetCurrentThread
LONG NTAPI ExSystemExceptionFilter(VOID)
#define IQS_SAME(Type, Alignment, Flags)
#define ICIF_PROBE_READ_WRITE
#define EXCEPTION_EXECUTE_HANDLER
VOID NTAPI ExpDeleteMutant(PVOID ObjectBody)
NTSTATUS NTAPI NtQueryMutant(IN HANDLE MutantHandle, IN MUTANT_INFORMATION_CLASS MutantInformationClass, OUT PVOID MutantInformation, IN ULONG MutantInformationLength, OUT PULONG ResultLength OPTIONAL)
GENERIC_MAPPING ExpMutantMapping
NTSTATUS NTAPI NtOpenMutant(OUT PHANDLE MutantHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
BOOLEAN NTAPI ExpInitializeMutantImplementation(VOID)
static const INFORMATION_CLASS_INFO ExMutantInfoClass[]
POBJECT_TYPE ExMutantObjectType
NTSTATUS NTAPI NtCreateMutant(OUT PHANDLE MutantHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN BOOLEAN InitialOwner)
NTSTATUS NTAPI NtReleaseMutant(IN HANDLE MutantHandle, IN PLONG PreviousCount OPTIONAL)
#define MUTANT_ALL_ACCESS
enum _MUTANT_INFORMATION_CLASS MUTANT_INFORMATION_CLASS
struct _MUTANT_BASIC_INFORMATION * PMUTANT_BASIC_INFORMATION
struct _MUTANT_BASIC_INFORMATION MUTANT_BASIC_INFORMATION
#define MUTANT_QUERY_STATE
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STANDARD_RIGHTS_READ
#define STANDARD_RIGHTS_WRITE
#define STANDARD_RIGHTS_EXECUTE
static __inline NTSTATUS DefaultQueryInfoBufferCheck(_In_ ULONG Class, _In_ const INFORMATION_CLASS_INFO *ClassList, _In_ ULONG ClassListEntries, _In_ ULONG Flags, _In_opt_ PVOID Buffer, _In_ ULONG BufferLength, _In_opt_ PULONG ReturnLength, _In_opt_ PULONG_PTR ReturnLengthPtr, _In_ KPROCESSOR_MODE PreviousMode)
Probe helper that validates the provided parameters whenever a NtQuery*** system call is invoked from...
LONG NTAPI KeReleaseMutant(IN PKMUTANT Mutant, IN KPRIORITY Increment, IN BOOLEAN Abandon, IN BOOLEAN Wait)
VOID NTAPI KeInitializeMutant(IN PKMUTANT Mutant, IN BOOLEAN InitialOwner)
LONG NTAPI KeReadStateMutant(IN PKMUTANT Mutant)
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
NTSTATUS NTAPI ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, IN PACCESS_STATE PassedAccessState, IN ACCESS_MASK DesiredAccess, IN OUT PVOID ParseContext, OUT PHANDLE Handle)
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
NTSTATUS NTAPI ObCreateObjectType(IN PUNICODE_STRING TypeName, IN POBJECT_TYPE_INITIALIZER ObjectTypeInitializer, IN PVOID Reserved, OUT POBJECT_TYPE *ObjectType)
NTSTATUS NTAPI ObReferenceObjectByHandle(IN HANDLE Handle, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE ObjectType, IN KPROCESSOR_MODE AccessMode, OUT PVOID *Object, OUT POBJECT_HANDLE_INFORMATION HandleInformation OPTIONAL)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
#define ProbeForWriteLong(Ptr)
#define ProbeForWriteHandle(Ptr)
PULONG MinorVersion OPTIONAL
struct _KTHREAD *RESTRICTED_POINTER OwnerThread
GENERIC_MAPPING GenericMapping
OB_DELETE_METHOD DeleteProcedure
ULONG DefaultNonPagedPoolCharge
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_In_ BOOLEAN InitialOwner
#define ObDereferenceObject
_In_ KPROCESSOR_MODE PreviousMode