Thanks for your reply. Both methods should suit my needs OK, as at least
right now I don't need to match a device across a reconnection. I just need
to detect which device has departed, and clean up, send client
notifications, etc.
Philip Lukidis
> -----Original Message-----
> From: Rich Kubota [mailto:email@hidden]
> Sent: Thursday, November 24, 2005 12:31 AM
> To: Philip Lukidis; email@hidden
> Subject: Re: kIOHIDLocationIDKey- what is it mean?
>
>
> At 9:36 AM -0500 11/23/05, 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?
>
> Philip,
>
> The LocationID property associated with each USB device is topology
> dependent. So long as the topology remains the same, a specific
> device will show the same locationID value across a restart.
> However, you indicate that you need to track which device is which.
> You can do so with the result which you get back from the
> IOIteratorNext function when you are processing the device/interface
> add and the device/interface remove function. When your
> addDevice/Interface function is called, the IOIteratorNext call
> returns a reference value. That same reference value will be returned
> by the iterator when the device/interface is removed. This reference
> value is unique while the device is attached. Of course, you can also
> get the LocationID value when the device is attached, and get the
> value when it is removed. They will be the same.
>
> However, if you are looking to match up a device across reconnection,
> this is a different question.
> --
> Sincerely,
> Rich Kubota
> email@hidden
> (408) 974-6212
> _______________________________________________
> 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
This email sent to email@hidden