ExAcquireRundownProtection function (wdm.h)
The ExAcquireRundownProtection routine tries to acquire run-down protection on a shared object so the caller can safely access the object.
BOOLEAN ExAcquireRundownProtection( [in, out] PEX_RUNDOWN_REF RunRef );
[in, out] RunRef
A pointer to an EX_RUNDOWN_REF structure that was initialized by a previous call to the ExInitializeRundownProtection routine. The run-down protection routines use this structure to track the run-down status of the associated shared object. This structure is opaque to drivers.
ExAcquireRundownProtection returns TRUE if the routine successfully acquires run-down protection for the caller. Otherwise, it returns FALSE. A return value of FALSE indicates that the run down of the object has started and that the object must be treated as invalid.
To safely access a shared object, a driver calls ExAcquireRundownProtection to acquire run-down protection on the object. The routine returns TRUE to indicate that run-down protection is in effect. When run-down protection is in effect, the driver can safely access the object without risk that the object will be deleted before the access completes.
As long as the run-down block itself is nonpaged, this function can be called at DISPATCH_LEVEL.
After completing the access, the driver calls ExReleaseRundownProtection to release the previously acquired run-down protection.
If ExAcquireRundownProtection returns FALSE, the object is no longer accessible. For example, if the object is to be replaced with a new one, the caller must wait for the object owner to create the new object, and then negotiate access to the new object.
For more information, see Run-Down Protection.
|Minimum supported client||Available starting with Windows XP.|
|Header||wdm.h (include Wdm.h)|
|IRQL||<= DISPATCH_LEVEL (see Remarks)|
|DDI compliance rules||HwStorPortProhibitedDDIs(storport)|
Submit and view feedback for