As part of a project at work, i've started to look into the possibility of building a very simple USB packet analyser application to debug our USB devices - which would eventually be incorporated into our other in-house application suites.
After a scan across the interweb (and a few runs of API Monitor on existing USB packet analyser applications) it looks as though CreateFile, WriteFile, ReadFile and DeviceIoControl are the API calls which could be used to achieve such an application.
Now, i can happily use CreateFile to get a handle to our USB devices, however i'm struggling to understand what to do with DeviceIoControl in order to monitor the packets to and from the USB device. Would it be a case that i buffer the requests to and from the device, do what i need to do, then forward them on to the target? Or is this completely off the mark?
This is possibly the wrong place to ask, if so then i apologise.
Would anyone be able to point me in the right direction?