You can look at the sample code in http://developer.apple.com, USB
Private Data Sample, I believe. The kIOHIDLocationID (or it's
equivalent for an IOUSBDevice and IOUSBInterface) will be unique for
each device, even across reboots, as long as the USB Bus topology
does not change. Specifically, this means that the upstream hubs and
ports do not change. If you unplug another device it will not change
your devices locationID.
--
Fernando Urbina
USB Technology Team
Apple Computer, Inc.
On Nov 23, 2005, at 4:36 AM, Philip Lukidis wrote:
Hello. I'm designing device arrival/departure notification
routines for my
HID device, and since any number of devices could be attached to
the host, I
need a way to differentiate between devices in my departure
notification.
Say if 3 devices were present, and their context stored away, I
need to know
which one of the 3 devices had departed, so I can clean up its
context. In
other words, I need a property which uniquely identifies each device.
Unfortunately, there is no unique serial number for each device. I
observed
that kIOHIDLocationIDKey is unique for each device. But what does
this
property mean? Is it guaranteed to be unique for each device, no
matter
what the topology?
thanks,
Philip Lukidis
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/usb/email@hidden