#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The MUTANT_BASIC_INFORMATION structure contains basic information about a mutant object.
* The structure is 8 bytes, but NtQueryMutant writes only the 6 bytes occupied by
* these members. The 2 trailing padding bytes are not initialized;
* compare members rather than the complete structure, or pre-zero the output.
*/
typedef struct _MUTANT_BASIC_INFORMATION
{
LONG CurrentCount; // 1 when unowned; 0 for one acquisition; 1 minus the recursive acquisition count otherwise.
BOOLEAN OwnedByCaller; // TRUE only when the calling thread is the current owner.
BOOLEAN AbandonedState; // TRUE after an owner exits without releasing; cleared when ownership is acquired.
} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
View code on GitHubNo description available.
Use MUTANT_BASIC_INFORMATION as a buffer in NtQueryMutant call.
If CurrentCount is less than zero, mutant is signaled.
It's TRUE if mutant is signaled by caller's thread.
Is set when thread terminates without call NtReleaseMutant.