Mailing Lists: Apple Mailing Lists

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

How to get at the indexed strings in a HID device



I have a HID device that works fine, but I now need to access the indexed strings. My device reacts to a specific command that I send to it using a feature report by placing data in the 10th indexed string, and my app now needs to retrieve that.

These should be accessible via the DeviceRequest() method, but this appears to be available only in the IOUSBDeviceInterface. I normally obtain an IOHIDDeviceInterface object, but this doesn't provide the DeviceRequest() method. When I attempt to obtain an IOUSBDeviceInterface object, first step being (right out of the "Working with USB Device Interface" booklet)

kr = IOCreatePlugInterfaceForService(usbDevice, kIOUSBDeviceUserClientTypeID, kIOCFPlugInterfaceID, &plugInterface, &score)

this fails returning 0x2c7, unsupported. The variant on the above code line that I usually use (see below) works:

kr = IOCreatePlugInterfaceForService(io_service_t, kIOHIDDeviceUserClientTypeID, kIOCFPlugInterfaceID, &plugInterface, &score)

I must be missing something basic, can anyone point me in the right direction? Thanks in advance.

Don





_______________________________________________
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


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.