Click here to Skip to main content
15,902,839 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello ALL,

I am writing a KMDF USB driver based upon the USBSAMP sample.

Firmware Scenarior:
*. Firmware will write to end point at its own wish. For example user has press mute button on device if so then my UI application should get/read those message and display on GUI.

*. My application is having one single thread for read and write one below other.

Problem
*. Writing is works fine from application to device.
*. But my Read API got hangs since i dont have data to read from the device.(As Device will write at its own wish (based upon some processing)

Code
1 .Call of ReadAPI readfile , triggers a break point in my registerd read Callback event that is

WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&ioQueueConfig,
WdfIoQueueDispatchParallel);
ioQueueConfig.EvtIoRead = UsbSamp_EvtIoRead;

2. Read Event calls the WdfRequestSend with correct I/0 target but its corrosponds register completion routin is never getting called as this time there is nothing to read...

3. How do i solve this problem ...
4. IS KMDF Continous Reader a solution to this. If yes please guide me on the same.
Posted

1 solution

if it is hanging provide a crash dump analysis (using windbg or a similar tool) so we can get an idea on whats happening exactly
 
Share this answer
 
v2
Comments
Kurt Degiorgio 12-May-11 11:14am    
reason for 1?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900