阅读:1222回复:0
关于厂商请求的问题,大家帮帮忙
这是我的驱动IoControl的代码:
NTSTATUS TestUsbDriverDevice::TESTUSBDRIVER_IOCTL_ADON_Handler(KIrp I) { NTSTATUS status = STATUS_SUCCESS; t << \"Entering TestUsbDriverDevice::TESTUSBDRIVER_IOCTL_ADON_Handler, \" << I << EOL; __try { // TODO: Verify that the input parameters are correct // If not, return STATUS_INVALID_PARAMETER if ( I.IoctlOutputBufferSize() <= 0 || !I.IoctlBuffer()) { t << \"IRP Error\" << EOL; __leave; } // TODO: Handle the the TESTUSBDRIVER_IOCTL_ADON request, or // defer the processing of the IRP (i.e. by queuing) and set // status to STATUS_PENDING. PURB pUrb = m_Lower.BuildVendorRequest(NULL, 0, 0, 1, 1); status = m_Lower.SubmitUrb(pUrb, 0, 0, 2000L); t << \"ad on ok\" << EOL; // TODO: Assuming that the request was handled here. Set I.Information // to indicate how much data to copy back to the user. } __finally { I.Information() = 0; I.Status() = status; } return status; } 但是每次发出的时候,我用BusHound查看,显示verdon,然后第2行有显示cancled,是不是这个请求被取消了?? 有经验的朋友帮忙说一下,这里应该怎么弄? |
|
|