当驱动完成了I/O请求,设置status,传输的number of bytes,发起请求线程的priority boost
下表是WDF驱动可以调用的完成方法(UMDF的接口为IWDFIoRequest)
create,cleanup,close可以用第一个,而读,写和大多数IOCTL请求(有data)可以用后两个。
priority boost 是用来增加等待I/O请求完成或接受请求的结果的线程的运行优先级。若不指定priority boost,framework根据设备类型使用默认值。
先cleanup,再complete,最后删除request对象。
不要在占有锁时调用任何I/O完成方法,容易死锁。
下表是WDF驱动可以调用的完成方法(UMDF的接口为IWDFIoRequest)
Action | UMDF method | KMDF method |
---|---|---|
Completes an I/O request with status and the default priority boost. | Complete | WdfRequestComplete |
Completes an I/O request with status, the number of bytes transferred, and the default priority boost. | CompleteWithInformation | WdfRequestCompleteWithInformation |
Completes an I/O request with status, number of bytes transferred, and priority boost. | None | WdfRequestCompleteWithPriorityBoost |
priority boost 是用来增加等待I/O请求完成或接受请求的结果的线程的运行优先级。若不指定priority boost,framework根据设备类型使用默认值。
先cleanup,再complete,最后删除request对象。
不要在占有锁时调用任何I/O完成方法,容易死锁。