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



Anthony-

When OSX first has USB devices added, they started with the basics, just drivers for the keyboard and mouse. When we added the HID Manager, we included a generic HID class driver, IOUSBHIDDriver which inherits from IOHIDDevice. It is the devices matched by IOHIDDevice that show up in your matching dictionary. This would include joysticks, game controllers, UPSes, monitors, etc. AppleUSBKeyboard and AppleUSBMouse, match at a higher level than IOUSBHIDDriver, so keyboards and mice have their own, non-IOHIDDevice drivers and thus do not show up in your match results.

We believe that keyboards and mice should naturally fit in with other HID devices, so that is our plan. In fact, the next major OS release will have mice inheriting from IOHIDDevice and you would then be able to have them show up. Keyboards are still in the planning stage, so i don't know when they will match for you.

-Keithen


At 2:13 PM -0500 3/27/02, Anthony Melidy wrote:
Hi,

I copied sample code directly from "Working With HID Class Device Interfaces". It did not work.

 hidMatchDictionary = IOServiceMatching(kIOHIDDeviceKey);
// produced a matching dictionary

ioReturnValue = IOServiceGetMatchingServices(masterPort, hidMatchDictionary, hidObjectIterator);
// returned empty iterator (with no error).


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
_______________________________________________
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.


--
_______________________________________________
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.