Remove Lock Routines

IoInitializeRemoveLock

Initializes a remove lock for a device object. A driver can use the lock to track outstanding I/O on a device and to determine when the driver can delete its device object in response to an IRP_MN_REMOVE_DEVICE request.

IoAcquireRemoveLock

Increments the count for a remove lock, indicating that the associated device object should not be detached from the device stack nor deleted.

IoReleaseRemoveLock

Releases a remove lock acquired with a previous call to IoAcquireRemoveLock.

IoReleaseRemoveLockAndWait

Releases a remove lock acquired with a previous call to IoAcquireRemoveLock and waits until all acquisitions of the lock have been released. A driver typically calls this routine in its dispatch code for an IRP_MN_REMOVE_DEVICE request.

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft