NtOpenSemaphore - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTEXAPI_H
#if (PHNT_MODE != PHNT_MODE_KERNEL)

NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenSemaphore(
    _Out_ PHANDLE SemaphoreHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ POBJECT_ATTRIBUTES ObjectAttributes
    );

#endif
#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwOpenSemaphore(
    _Out_ PHANDLE SemaphoreHandle,
    _In_ ACCESS_MASK DesiredAccess,
    _In_ POBJECT_ATTRIBUTES ObjectAttributes
    );

#endif

View code on GitHub

Function NtOpenSemaphore opens named Semaphore Object. This operation doesn't modify semaphore's internal counter.

SemaphoreHandle

Result of call - pointer to HANDLE to Semaphore Object.

DesiredAccess

Access rights, described in NtCreateSemaphore.

ObjectAttributes

Pointer to OBJECT_ATTRIBUTES structure containing semaphore's name.

Documented by

See also