The completion routine,cancellation routine, timeout process routine of the same write request running in DISPATCH_LEVEL . If i am in processing completion routine,can the cancellation routine be called ? or vice versa . while there are all in the same DISPATCH_LEVEL .
If Yes , I have to synchronize the process , can anyone give me any guidance. I am programming with WDF ,Is there any sample code or documents in WDK talking about synchronization?
I have another question ,It doesn’t matter with synchronization in DISPATCH_LEVEL.
It is something about continuous reader . I set EvtUsbTargetPipeReadersFailed(return TRUE) for the continuous reader ,sometimes ,.EvtUsbTargetPipeReadersFailed was called hundreds of times .
before it was called .everything seems ok .I just got a read request be completed,and write request be completed . and suddenly .It appeared failed in reader. and plug out and in device again . It become normal state (can read /write).
It is not happened frequently .I hope any one ever come across this case would kind to give me some hints?
LOG :
Complete Request : 0x76765A00 with status 0x00000000 .
BulkInPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
BulkInPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
InterruptINPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
BulkInPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
BulkInPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
InterruptINPipeReadersFailed Status =0xC0000001,UsbdStatus = 0x00000000 .
…
…
Received a write request(0x76765A00) of 29 bytes
Failed the Write request(0x76765A00) with status 0xC0000001