Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOServiceGetMatchingServices() returning empty iterator



On Wednesday, March 27, 2002, at 12:13  PM, Anthony Melidy wrote:

Then I replaced kIOHIDDeviceKey with kIOUSBDeviceClassName and did get an iterator with the new matching dictionary.

My mac has an Apple Keyboard and Apple Mouse. Are they both not HID devices in OS X?

Should I not have obtained an iterator with 2 items in the first case? Is there a problem with IOServiceGetMatchingServices()?

Any Ideas?

Anthony,

It turns out that on any shipping version of Mac OS X, the AppleUSBMouse and the AppleUSBKeyboard drivers (objects) are NOT IOHIDDevice objects. They ARE IOHIDevice objects (count the number of capital "D"s).

The difference is this.. There are actually two different hunks of code in Mac OS X for dealing with HID devices. One is called IOHIDSystem, and the other is IOHIDFamily.

IOHIDSystem is very specific to pointing devices and keyboards. It implements the IOHIDevice class, as well as two subclasses - IOHIPointing and IOHIKeyboard. AppleUSBKeyboard is a subclass of the former and AppleUSBKeyboard is a subclass of the latter.

IOHIDFamily is the one which implements the IOHIDDevice class, which you were looking for with the snippet of code you provided. We do have some of these created - for example with the cube speakers - but not very many at this time.

The "ioclasscount" command might help you sort this out.

Hope this helps.

Rhoads Hollowell
USB Software Team
Apple Computer, Inc.
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.

References: 
 >IOServiceGetMatchingServices() returning empty iterator (From: Anthony Melidy <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.