EngAcquireSemaphore function (winddi.h)

The EngAcquireSemaphore function acquires the resource associated with the semaphore for exclusive access by the calling thread.

Syntax

ENGAPI VOID EngAcquireSemaphore(
  [in] HSEMAPHORE hsem
);

Parameters

[in] hsem

Handle to the semaphore associated with the resource to be acquired.

Return value

None

Remarks

EngAcquireSemaphore allows exclusive access to the driver resource associated with the semaphore by locking out all other threads from accessing the semaphore's resource.

A call to this routine should be followed with a call to EngReleaseSemaphore as quickly as possible.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Universal
Header winddi.h (include Winddi.h)
Library Win32k.lib
DLL Win32k.sys

See also

EngCreateSemaphore

EngDeleteSemaphore

EngIsSemaphoreOwned

EngIsSemaphoreOwnedByCurrentThread

EngReleaseSemaphore