hi Uwe, Well, maybe one thing you can do it's to enumerate all installed instance (even those not present), check their name in order to know what next instance Id you can put? In my case I specify the present (currently plugged) ones, but I guess just removing the flag: DIGCF_PRESENT would do the job... hInfo = SetupDiGetClassDevs(&guid, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); Well, this instance id who seem to be add automatically, I wonder how they build it? Or if the device identifier (midiInGetID) can match with an index in a SetupDiEnum...? Btw, I saw that some device contain an alias... "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{guid..}\00xx|Dri vers\midi\wdmaud.drv". But that information seem to be useless!? Maybe I should consider like you try.. having a unique name for our device with a instance id added. I heard that the user can change the name of his device on XP? I wonder if your solution will still work? regards, yann -----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx]On Behalf Of uwe kirst Sent: February 9, 2006 11:30 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: How to bind a symbolic link to a mixer, midi or wave device name? Yann Hamiaux wrote: >So far, I've been able to enumerate all MIDI symbolic link and get their >friendly name. However, when I have 2 devices with the same VID and PID, the >friendly name is exactly the same. While when I look to the list mixer name >they do have a different name "Mixer Device" and "Mixer Device (2)". > Thats probably the situation under XP -> the instance id is added by windows atomatically. Under Vista the instance id is missing (thats at least my experiance). I tried to add it within my driver, but I found no reliable way of doing so. If you have two physical identical devices and you install them one after each other while the other is not powererd, they will get the same name. If you now power them both, they will have the same name, because the name is set during install not during driver load. I personally would prefer to add the unique id owned by the device to the friendly name, but this seem to be impossible because the names are added during install by the .inf file. If no other idea comes to my mind I think I will try to add a random (unique) name by my driver rather by .inf file. Maybee that will help? >So far, >I deal with some SetupDi... functions to enumerate all devices in a >category. I also, kind of reverse-engineer the GUID I need for the >enumeration by looking to the registry under >"Local_Machine\System\CurrentControlSet\Control\DeviceClasses\". Maybe there >is a .h file I should look to have a proper list of these GUID? > > > I was told that you generate these GUIDs by yourself with guigen. They are added during installation by the .inf file. The header file only cointains some predefined (by microsoft) device types. Uwe ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.com/