Getting Strings

The documentation for WdfUsbTargetDeviceFormatRequestForString suggests
that the result will be a USB_STRING_DESCRIPTOR structure. The evidence
I see suggests that it is actually returning the string itself, which is
2 bytes into that structure. Is that possible? If so, how do I find
out how long the string really is?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Tim Roberts wrote:

The documentation for WdfUsbTargetDeviceFormatRequestForString suggests
that the result will be a USB_STRING_DESCRIPTOR structure. The evidence
I see suggests that it is actually returning the string itself, which is
2 bytes into that structure. Is that possible? If so, how do I find
out how long the string really is?

I didn’t really need to ask the last question; formatting an URB and
sending it directly works just like I expect, and it’s actually fewer
lines of code than the …FormatRequestForString solution. I’d just
like to know whether the doc matches the implementation.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I will check it out and get back to you

d

Sent using my smartphone, apologies forany typos

-----Original Message-----
From: “Tim Roberts”
To: “Windows System Software Devs Interest List”
Sent: 09/14/07 9:15 PM
Subject: Re: [ntdev] Getting Strings

Tim Roberts wrote:
> The documentation for WdfUsbTargetDeviceFormatRequestForString suggests
> that the result will be a USB_STRING_DESCRIPTOR structure. The evidence
> I see suggests that it is actually returning the string itself, which is
> 2 bytes into that structure. Is that possible? If so, how do I find
> out how long the string really is?
>

I didn’t really need to ask the last question; formatting an URB and
sending it directly works just like I expect, and it’s actually fewer
lines of code than the …FormatRequestForString solution. I’d just
like to know whether the doc matches the implementation.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer