I don’t see how order has anything to do with it. you want it to be property based, not derived from another abstraction like the name or identity on the bus. If I always used the lower serial number and I had 2 instances of the same device, what does that mean?
What you want is to determine what the device does and make an intelligent policy decision off of that. For an audio device in windows, the INF can indicate if the device should be given preference to be the default audio device or not. Certainly not based on what its symlink name is
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Uwe Kirst
Sent: Friday, September 05, 2008 1:47 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] how to give a device name to connected usb devices ?
Doron Holan schrieb:
Why does it matter which is first?
The user has its own special settup. For example he connects his monitor
speaker to the first device, his headphones to the second. So he is very
confused if the next time he powers up his computer, the sound does not
come out of the device it is used to come.
For non microsoft APIs or applications the solution to this problem is
in my opinion that you reorder the devices with your own algorithm,
example: the devices with the lowest serial numer (if the devices has
one) is always presented to the user as the first.
For microsoft APIs, like the wave API I have no solution.
/Uwe
Instead of using the name to indicate order, have the device tell you when it started through an IOCTL (system time or in tick count). You find a device, you ask it the start time, you self sort. No need to create an attribute on a naming system to imply more information other than the name of the device you want to talk to
d
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Uwe Kirst
Sent: Thursday, September 04, 2008 10:06 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] how to give a device name to connected usb devices ?
But there is also a major problem with the guids and the setup api: If
you have more than one device of the same type you never know which is
the first one and which the second, because the sorting algorithm which
microsoft implements is unknown. Furthermore it seems to vary from time
to time which is the first and which the second device.
From the user point of view this is very bad, it causes major confusion.
(my experince is about firewire, usb may be similar)
/Uwe
Doron Holan schrieb:
> Which GUID entry in the INF? The class GUID at the top of the INF is *not* the device interface GUID. Why are you moving to hard coded names? There are a few problems with them
> 1) you do not know when a new device arrives
> 2) when do you stop iterating over the sequence in the names and know you found the last device?
> 3) what happens if you have holes in the hard coded names? E.g. USBDevice-2 goes away? Are you always going to iterate from 1?
>
> Device interface guids solve all of these problems. You can get dynamically notified of arrival, departure and you definitively know how many devices there are w/out trying to iterate over a device name space.
>
> d
>
>
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer