Capturing URB & IRP!!

Dear All,

We are developing MFC based application to test USB Mass Storage Devices.
Application will access USB Mass Storage Device using Kernel Mode Client.

We are developing WDM based Kernel Mode Driver for the same.

One of the requirement of application is to capture all IRPs and URBs which
are travelling in stack.

Can anybody put light, How application like USBLyzer capture this
information and How this information is communicated to application for
Display?

Thanks in advance!!

Regards
Sunil

Typically these things are monitored with filter drivers. A few
questions:

  1. Why do you want both URB’s and IRP’s? For the most part these are
    differing level things, in that you deal with IRP’s to a point where the
    URB’s are generated.

  2. Why in the world would you do this with WDM instead of KMDF. Most
    of the filter driver is going to be PnP/Power bookkeeping if you do WDM,
    but that is exactly what KMDF will take care of for you.

For communicating back to the display application, you would typically
use the inverted call model see
http://www.osronline.com/article.cfm?id=94

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Sunil Kumar” wrote in message
news:xxxxx@ntdev:

> Dear All,
>
> We are developing MFC based application to test USB Mass Storage Devices.
> Application will access USB Mass Storage Device using Kernel Mode Client.
>
> We are developing WDM based Kernel Mode Driver for the same.
>
> One of the requirement of application is to capture all IRPs and URBs which
> are travelling in stack.
>
> Can anybody put light, How application like USBLyzer capture this
> information and How this information is communicated to application for
> Display?
>
> Thanks in advance!!
>
> Regards
> Sunil

BusTrace may help. I’ve used it for storage traffic.

here is my program (with source included) that captures URBs (not all of
them) via a filter driver and passes them to a .NET app for analysis.

http://code.google.com/p/busdog/

The filter driver is KMDF which simplifies it a whole bunch.

On Sat, Sep 18, 2010 at 5:50 AM, Sunil Kumar wrote:

> Dear All,
>
> We are developing MFC based application to test USB Mass Storage Devices.
> Application will access USB Mass Storage Device using Kernel Mode Client.
>
> We are developing WDM based Kernel Mode Driver for the same.
>
> One of the requirement of application is to capture all IRPs and URBs which
> are travelling in stack.
>
> Can anybody put light, How application like USBLyzer capture this
> information and How this information is communicated to application for
> Display?
>
> Thanks in advance!!
>
> Regards
> Sunil
>
>
>
>
> — NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer