On 2012.07.16 21:57, John Chen wrote:
>     One more thing,
>     althrough libusb_get_string_descriptor_ascii successfully get the
>     serial #, but it returns 0x0000000b (no zero) and const char* error
>     = libusb_error_name(r);
>     the  error = 0x000000013fe41e10 "**UNKNOWN**", no sure what it is.

Someone may already have answered, but you may want to familiarize 
yourself with the libusbx API.

As indicated here: 
http://libusbx.sourceforge.net/api-1.0/group__desc.html#gaf3f92d0a7465d49a5e61eb3f8689fae4,
 
libusb_get_string_descriptor_ascii(), on success, returns the number of 
bytes read. Therefore, in case 11 bytes were read, 0x0b will be returned.

Most libusb/libusbx calls will return zero or a positive value on 
success, and negative on error, so as long as you don't get a negative 
value, you shouldn't have to call libusb_error_name(r).

Please don't hesitate to check the API documentation at 
http://libusbx.sourceforge.net/api-1.0/index.html if you want to find 
out more on the API calls.

Regards,

/Pete



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to