USB Device Driver with multiple devices with same VID/PID RRS feed

  • Question

  • I have a situation in which I have say 2 USB devices having the same VID/PID combination. You might say the device is made in-house with the firmware being identical. I am trying to develop a Windows client driver for this device(s) on Embdded Compact 7

    Assume that the driver DLL is MYUSB.DLL. I have exported the USBAttach function which gets called everytime the devices are physically connected.

    The question is if I create a static global variable , say DWORD TEST in the driver, and increment the value every time the USB attach is called, will the value after incrementing be monotonic. My question as an example.


    ****1st device connected******

    USBAttach called and TEST++ is executed.

    *****2nd device connected******

    USBAttach is called. Will the read of TEST be 1 or is it in a differnt process space?

    Thanks for any help.


    Saturday, August 3, 2013 3:14 AM

All replies

  • Yes the TEST is global variable so for the second instance of USB attach it will be read as 1. Only limitation is scope of this variable be local to this file.

    Best Regards,


    Monday, August 5, 2013 5:00 AM