none
Can somebody clarify the interface id vs vid/pid please RRS feed

  • Question

  • Hi Everybody,

    I am working on an app that uses USB protocol to implement HDLC protocol for exchanging messages between our GUI PC app and our home designed traffic controller - probably irrelevant to my question - but I include it for the completeness of my question.
    I am using WinUSB function driver and its API to talk to USB devices. I am a bit confused about the meaning of a device interface GUID and vid/pid specified in .inf file like this;

    [Dev_AddReg]
    HKR,,DeviceInterfaceGUIDs,0x10000,"{00873fdf-61a8-11d1-aa5e-00c04fb1728b}"
     [Standard.NTamd64]
    %DeviceName% =USB_Install, USB\VID_045E&PID_930A   ; Intel 82930


    Is this correct to say that:

    1) When I plug in a device(s) with vid/pid specified in .inf file Windows will associate the interface GUID with that device(s) and will load WinUSB (Winusb.sys) function driver (also specified in .inf file) and from then I can use the “SetupDi” family API to enumerate all plugged in devices with specified vid/pid , open them and send/receive the data to/from them.

    Regards,

    Janusz

    Friday, May 10, 2013 10:47 AM

Answers

  • Your statement is basically correct.  To expand it VID/PID pair is used by the system through plug and play to enumerate a device to the WinUSB.sys driver.  The WinUSB.sys creates a device interface for its FDO that accesses that device.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Friday, May 10, 2013 11:06 AM
  • Sure,   start with http://msdn.microsoft.com/en-us/library/windows/hardware/ff545432(v=vs.85).aspx  This is targeted towards writing KMDF drivers, but is a good place to start.  You guessed correctly that FDO is functional device object.  FDO are the objects that recieve I/O requests, and the device interface is a symbolic link based on a GUID to a FDO.  The SetupDi API's allow you to enumerate these interfaces based on their GUID.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    • Marked as answer by JDalecki Friday, May 10, 2013 8:56 PM
    Friday, May 10, 2013 12:19 PM

All replies

  • Your statement is basically correct.  To expand it VID/PID pair is used by the system through plug and play to enumerate a device to the WinUSB.sys driver.  The WinUSB.sys creates a device interface for its FDO that accesses that device.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Friday, May 10, 2013 11:06 AM
  • First of all, thank you for your reply Don.<o:p></o:p>

    However what do you mean by saying: "The WinUSB.sys creates a device interface for its FDO that accesses that device?" What is this FDO (I guess Function Device Object?)<o:p></o:p>

    Can you refer me to some documentation so I can get some more in depth understanding of it, please?

    Regards,

    Janusz<o:p></o:p>

    <o:p></o:p>

    Friday, May 10, 2013 11:33 AM
  • Sure,   start with http://msdn.microsoft.com/en-us/library/windows/hardware/ff545432(v=vs.85).aspx  This is targeted towards writing KMDF drivers, but is a good place to start.  You guessed correctly that FDO is functional device object.  FDO are the objects that recieve I/O requests, and the device interface is a symbolic link based on a GUID to a FDO.  The SetupDi API's allow you to enumerate these interfaces based on their GUID.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    • Marked as answer by JDalecki Friday, May 10, 2013 8:56 PM
    Friday, May 10, 2013 12:19 PM
  • Thanks Don,

    Regards,

    Janusz

    Friday, May 10, 2013 8:56 PM