DispatchCreate, DispatchClose, and DispatchCreateClose Routines
A driver's DRIVER_DISPATCH IRPs with I/O function codes of IRP_MJ_CREATE and IRP_MJ_CLOSE, respectively. Alternatively, a combined DispatchCreateClose routine can handle IRPs for both of these I/O function codes.
A create request can originate either from a user-mode subsystem's attempt to get a handle to a file object representing a device (possibly on behalf of an application or subsystem-level driver) or in a higher-level driver's call to IoGetDeviceObjectPointer or IoAttachDevice.
A reciprocal close request originates from a user-mode subsystem's close of the file object handle associated with the driver's device object.
Each of these requests is inherently synchronous.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for