Skip to content

Commit f7b3cea

Browse files
committed
Add explanations about IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION.
Specifically that it has a guaranteed single return value and the OS versions for which it is supported (the last being a guess and TBC).
1 parent 74f607e commit f7b3cea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

wdk-ddi-src/content/fltkernel/nf-fltkernel-fltcheckoplockex.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@ A minifilter driver calls **FltCheckOplockEx** to synchronize an IRP-based I/O o
145145

146146
* IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION
147147

148-
The I/O operation must be an IRP-based I/O operation. To determine whether a given callback data structure represents an IRP-based I/O operation, use the [FLT_IS_IRP_OPERATION](/previous-versions/ff544654(v=vs.85)) macro.
148+
With the exception of IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION, the I/O operation must be an IRP-based I/O operation. To determine whether a given callback data structure represents an IRP-based I/O operation, use the [FLT_IS_IRP_OPERATION](/previous-versions/ff544654(v=vs.85)) macro.
149149

150150
Minifilters must not call **FltCheckOplockEx** again within the callback specified in *WaitCompletionRoutine*. Doing so can result in a deadlock condition if the oplock package calls the completion callback before **FltCheckOplockEx** returns.
151151

152+
**FltCheckOplockEx** will only every return FLT_PREOP_SUCCESS_WITH_CALLBACK when the major function is IRP_MJ_ACQUIRE_FOR_SECTION_SYNCHRONIZATION. Calling **FltCheckOplockEx** is supported on all OS versions from Windows 7/Server 2008 (TBC!).
153+
152154
For more information about opportunistic locks, see [Opportunistic Locks](/windows/win32/fileio/opportunistic-locks).
153155

154156
## -see-also

0 commit comments

Comments
 (0)