阅读:711回复:3
有人回答吗?
请问IRP_MJ_FLUSH_BUFFERS,IRP_MJ_CLEANUP的响应函数
作用是啥? |
|
沙发#
发布于:2003-06-07 22:13
IRP_MJ_CLEANUP应该是清除所有IRP吧
|
|
|
板凳#
发布于:2003-06-07 23:13
请问IRP_MJ_FLUSH_BUFFERS,IRP_MJ_CLEANUP的响应函数 函数名在driverendry中自己定义。 |
|
地板#
发布于:2003-06-07 23:22
IRP_MJ_CLEANUP
Drivers that have Cancel routines also must handle cleanup requests. Input Parameters None Output Parameters None When Sent Receipt of this request indicates that the handle for the file object, representing the target device object, is being released. Operation If the driver\'s device objects were set up as exclusive, thereby allowing only a single thread to use the device at any given time, the driver completes every IRP currently queued to the target device object with STATUS_CANCELLED set in each IRP\'s I/O status block. Otherwise, the driver must cancel and complete any currently queued IRPs for the holder of the file object handle that is being released. After cancelling outstanding IRPs in the queue, the driver completes the cleanup IRP with STATUS_SUCCESS set in its I/O status block. IRP_MJ_FLUSH_BUFFERS Drivers of devices with internal caches for data and drivers that maintain internal buffers for data must handle this request. Input Parameters None Output Parameters None When Sent Receipt of a flush request indicates that the driver should flush the device\'s cache or its internal buffer, or, possibly, should discard the data in its internal buffer. Operation The driver transfers any data currently cached in the device or held in the driver\'s internal buffer(s) before completing the flush request. The driver of an input-only device that buffers data internally might simply discard the currently buffered device data before completing the flush IRP, depending on the nature of its device. DDK难道没有讲吗? :o :D :D |
|