none
Regarding Device Interface RRS feed

  • Question

  • Hello Everybody,

    I have some little background about Windows device driver. Recently i am involved in developing WDF driver and handling interaction 
    between this driver and one WDM driver. 

    Here is my scenario:

    The WDF driver registers one device interface for an application(running in user mode). The application enumerates the device interface using SetupDi and works perfectly as expected. 

    Now another driver (WDM based) wants to communicate to the hardware through the WDF driver. Can i use "IoGetDeviceInterfaces" followed by "IoGetDeviceObjectPointer" to get the device object. My question is : As we have registered only one interface and if the application is already enumerated the interface, then later the call to "IoGetDeviceInterfaces" request by the WDM driver will be resolved?

    Thanks & Regards,
    Selva


    Thursday, July 24, 2014 6:13 PM

Answers

  • Yes the device interface will be found by all the drivers requesting it.  Of course, the question is do you want one interface that is used between both drivers and user space, or do you want a driver interface for the kernel components that is independant of the one the user space components use?


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Thursday, July 24, 2014 6:23 PM

All replies

  • Yes the device interface will be found by all the drivers requesting it.  Of course, the question is do you want one interface that is used between both drivers and user space, or do you want a driver interface for the kernel components that is independant of the one the user space components use?


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Thursday, July 24, 2014 6:23 PM
  • Hi Don,

    I think one interface is enough in my case.

    Is there any synchronization required when the application and the second WDM driver want to access different device register (by invoking different method in the WDF driver) at the same time.

    And one more question.

    Using a single registered interface, multiple application can enumerate/communicate to the device without any issue.  

    Regards,

    Selva.s

    Thursday, July 24, 2014 6:43 PM
  • only you know if sync is required between two clients of your interface

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 25, 2014 12:51 AM