Hi:
I am developing the USB camera mini driver on OS XP sp2 , and using the
USBCAMD DDK.
I use the interrupt from interrupt pipe to inform our driver that
hardware button has been touched.
If one interrupt happens, it should call into the
USBCAMD_BulkTransferComplete().
In USBCAMD_BulkTransferComplete(), I use the first interrupt to trigger
the application to open, like amcap, and the others to trigger the
snapshot from opened application.
Now I got some strange mistakes. If I use first interrupt to open the
amcap, and use the continuous even number time interrupts to get enen
number time snapshot, then close the amcap. The next time I touch the
hardware button to open the amcap, the USBCAMD_BulkTransferComplete()
will not be called. But if I touch the hardware button again , it
works. Why?
If I use first interrupt to open the amcap, and click odd number time
interrupts to get odd number time snapshot, then close the amcap. The
next time I touch the hardware button, the
USBCAMD_BulkTransferComplete() will be called.
I also do some tests. If don't trigger any application to open in
USBCAMD_BulkTransferComplete(), the interrupt works fine. So I think
there must be some issues in USBCAMD_CancelOutstandingBulkIntIrps().
I don't have any idea why it happens? How can I make sure if I touch
the hardware button, the corresponding interrupt is really notified to
the USBCAMD driver or not? Would you tell me what I should pay
attention to?
Thanks