Get Underlying Device Object

Discussion in 'Windows Vista Drivers' started by Sushma, Apr 30, 2007.

  1. Sushma

    Sushma Guest

    Hello All,

    Im developing a USB-UART driver using WDF KMDF. I have completed the
    USB part, enumeration and retrieving the descriptor information. I
    have a device context which maintains all the USB information. Then i
    created a PDO for Serial Bus using WdfPdoInitAllocate() and other WDF
    functions and then further proceeded to enumerate a child device for
    serial. I loaded the my serial driver which is actually a single
    driver for both USB and Serial. This i have separated using registry

    My problem is that i want to access device context variables that i
    initialized when USB was created from serial. How can i get the device
    context in serial driver which i created in USB. I need to get the USB
    device object in Serial.

    My understanding goes like this

    FDO ------- Serial
    PDO -------- Serial Bus
    FDO -------- USB FDO
    USB Stack

    I need to get the USB FDO object using Serial FDO object.

    Any suggestions will be greatly appreciated.

    Thank You.

    Sushma, Apr 30, 2007
    1. Advertisements

  2. Sushma

    R. Yang Guest

    Although I do not know the details of your driver, in such product
    usually serial bus is created by your usb driver. So, if you want to
    get something from the usb driver in your serial driver, just send IRP
    down to serial bus PDO. In the usb driver's dispatcher, check if it's
    a request to PDO. If yes, return the appropriate data and complete
    that IRP.

    R. Yang
    - Windows Kernel Developer [Custom Dev and Consulting]
    R. Yang, May 1, 2007
    1. Advertisements

  3. Sushma

    Sushma Guest

    Thanks for the reply. Infact i have created the serial bus from USB
    driver. I donot have intention to pass any data down the stack right
    now. At a later stage i may need to do this also. My question is, i
    want to have access to device context variables of USB driver in
    serial driver. I donot know if this is feasible to do this or not.

    Thank You.

    Sushma, May 1, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.