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: Access to the strings indexed by the IOUSBDeviceDescriptor



Title: Re: Access to the strings indexed by the IOUSBDeviceDescri
To get a string, you use the standard device requests (GET_DESCRIPTOR) described in the USB spec, chapter 9.   Your code to do that might look something like (not tested, top of my head, be on the lookout for possiblebyte-swapping issues in the wValue/wIndex fields):

    req.bmRequestType = USBmakebmRequestType(kUSBIn, kUSBStandard, kUSBDevice);
    req.bRequest = kUSBRqGetDescriptor;  // See USB Spec, 9.4.3
    req.wValue = (3 << 8)|StringIndex;  // Which descriptor (STRING == DescriptorType 3)
    req.wIndex = 0x0904; // LangID == English?
    req.wLength = bufsize; // 32bit int
    req.pData = &mybuf;
   
    err = (*dev)->DeviceRequest(dev, &req);
   
if (kIOReturnSuccess == err)
    {
        // mybuf now contains the string descriptor
    }



At 4:23 PM -0400 4/19/05, Don Clark wrote:
I'd like to access the strings referenced by the iManufacturer, iProduct and iSerialNUmber members of the IOUSBDeviceDescriptor object, but cannot find any reference to a method to do this in the set of USB header files (usb.h, iousblib.h, etc).  Could someone point me in the right direction?  Thanks in advance

Don Clark

 _______________________________________________
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

References: 
 >Access to the strings indexed by the IOUSBDeviceDescriptor (From: Don Clark <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.