INtime SDK Help
UsbGetLanguageString
INtime SDK v7 > About INtime > Networking and I/O > USB > USB calls > UsbGetLanguageString

Obtain a string in a specific language from a string descriptor on a device. The string returned is in UNICODE format.

int32_t UsbGetLanguageString( 
int32_t udev,
uint16_t langid,
uint8_t idx,
void *buf,
uint32_t bufsize,
uint32_t *strsize

);

Parameters

udev
Device handle from UsbOpenDevice.
langid
Which language string to obtain. Use 0 to obtain the default language string for the device. Language type ids are available at www.usb.org.
idx
Index value of the string to obtain.
buf 
Pointer to a buffer to receive the string.
bufsize 
Size in bytes of the destination buffer. Strings are at most 255 bytes long.  
strsize
Pointer to a variable which receives the size in bytes received string.
Note: The string is not null-terminated
  

Return Values

USB_ERR_NORMAL_COMPLETION Success.
USB_ERR_NO_STACK The USB stack is not ready.
USB_ERR_MEMORY Memory could not be allocated for the operation.
USB_ERR_TIMEOUT The device did not respond.
USB_ERR_INVAL The value of the idx parameter is not a valid index.

Requirements

Versions Defined in Include Link to
INtime 5.0 intime/rt/include/usbif3h usbif3h usbif3lib