IWDFObject::AcquireLock method

The AcquireLock method prevents the framework from calling methods of interfaces that a driver registered.

Syntax


void AcquireLock();

Parameters

This method has no parameters.

Return value

None

Remarks

If a driver configured itself to use the AcquireLock locking scheme, the framework automatically acquires the "presentation" lock before calling into the driver. (For more information about this locking scheme, see Specifying a Callback Synchronization Mode.) The AcquireLock and IWDFObject::ReleaseLock methods acquire and release the presentation lock, respectively. Framework device objects and framework I/O queue objects currently support the AcquireLock method.

The driver calls the AcquireLock method to manipulate its objects that were created from its callback interfaces outside the callback scope in a thread-safe manner. The AcquireLock method represents an advanced feature of the framework that most drivers will not use because improper usage can result in deadlocks.

Unsynchronized code can call AcquireLock. The driver should call on objects that match its synchronization scope.

Examples

For a code example of how to use the AcquireLock method, see IWDFDevice::SetPnpState.

Requirements

End of support

Unavailable in UMDF 2.0 and later.

Minimum UMDF version

1.5

Header

Wudfddi.h (include Wudfddi.h)

DLL

WUDFx.dll

See also

IWDFObject
IWDFObject::ReleaseLock

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft