#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtOpenSemaphore routine opens a handle to an existing semaphore object.
*
* \param SemaphoreHandle A pointer to a variable that receives the semaphore object handle.
* \param DesiredAccess The access mask that specifies the requested access to the semaphore object.
* \param ObjectAttributes A pointer to an OBJECT_ATTRIBUTES structure that specifies the object attributes.
* \return NTSTATUS Successful or errant status.
*/
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenSemaphore(
_Out_ PHANDLE SemaphoreHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ PCOBJECT_ATTRIBUTES ObjectAttributes
);
View code on GitHub#ifndef _NTZWAPI_H
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwOpenSemaphore(
_Out_ PHANDLE SemaphoreHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ PCOBJECT_ATTRIBUTES ObjectAttributes
);
View code on GitHubNo description available.
Function NtOpenSemaphore opens named Semaphore Object. This operation doesn't modify semaphore's internal counter.
Result of call - pointer to HANDLE to Semaphore Object.
Access rights, described in NtCreateSemaphore.
Pointer to OBJECT_ATTRIBUTES structure containing semaphore's name.