PFN_WDFOBJECTACQUIRELOCK - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfsync.h

VOID WdfObjectAcquireLock(
  _In_ WDFOBJECT Object
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfsync-wdfobjectacquirelock)

WdfObjectAcquireLock function

Description

[Applies to KMDF and UMDF]

The WdfObjectAcquireLock method acquires an object's synchronization lock.

Syntax

VOID WdfObjectAcquireLock(
  _In_ WDFOBJECT Object
);

Parameters

Object [in]

A handle to a framework device object or a framework queue object.

Remarks

A bug check occurs if the driver supplies an invalid object handle.

A driver can call the WdfObjectAcquireLock method to acquire the synchronization lock that is associated with a specified framework device object or framework queue object. The method does not return until the lock has been acquired.

When the driver no longer needs the object's synchronization lock, it must call WdfObjectReleaseLock.

If the driver specified WdfExecutionLevelPassive for the ExecutionLevel member of the specified object's WDF_OBJECT_ATTRIBUTES structure, the driver must call WdfObjectAcquireLock at IRQL <= APC_LEVEL. WdfObjectAcquireLock acquires a fast mutex and returns at the caller's IRQL. (In this case, WdfObjectAcquireLock also calls KeEnterCriticalRegion before returning so that normal kernel APCs are disabled.)

If the driver did not specify WdfExecutionLevelPassive for the ExecutionLevel member of the specified object's WDF_OBJECT_ATTRIBUTES structure, the driver must call WdfObjectAcquireLock at IRQL <= DISPATCH_LEVEL. WdfObjectAcquireLock acquires a spin lock and returns at IRQL = DISPATCH_LEVEL.

For more information about synchronization locks, see Synchronization Techniques for Framework-Based Drivers.

See also

WDF_OBJECT_ATTRIBUTES

KeEnterCriticalRegion

WdfObjectReleaseLock