none
How can I set the number of my device under UMDF? RRS feed

  • Question

  • Hi all:

        I found that the UMDF can't use the Global value to set the device number.

        Such like this: the first device name set "device 0";

                                 the second device name set "device 1";

        but I don't know how many device use UMDF , is there any way to get the device numbers?

    Tuesday, December 4, 2012 2:47 AM

All replies

  • What do you mean global value? Where are you seeing these strings? In device manager? Why do you need these incrementing numbers? What problem are you solving?

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

    Tuesday, December 4, 2012 3:47 AM
  • Sorry for my poor English.

    I use a global array to indicate the device number of my devices.

    I want to set the device ID by using this array. And in OnDeviceAdd function, I will set one to TRUE.But I found the array had just change once when I insert two device.I don't know how to set the ID for my device.

    I want to get the ID by using IWDFDeviceInitialize::RetrieveDevicePropertyStore,but it will clash. So I don't know how to set the ID for my device. 

    Tuesday, December 4, 2012 3:58 AM
  • each UMDF driver is in its own process, new for win8 and v1.11, you can have them in the same processing with umdf device pooling, http://msdn.microsoft.com/en-us/library/windows/hardware/hh463993(v=vs.85).aspx .

    why do you need to set the ID? after setting it, who uses it?


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

    Tuesday, December 4, 2012 5:25 AM
  • I want to set the ID,so that I can distinguish the devices by the device name.

    And you know I‘m developing a Smartcard Reader.The system will want to get attribute by DeviceIoControl.

    And there is a attribute with "DEVICE_UNITS", And then I should set the ID to the request.So I should set the device ID.


    • Edited by wu330 Tuesday, December 4, 2012 5:41 AM
    Tuesday, December 4, 2012 5:35 AM