| 1150 | } |
| 1151 | |
| 1152 | int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *dev, int string_index, wchar_t *string, size_t maxlen) |
| 1153 | { |
| 1154 | wchar_t *str; |
| 1155 | |
| 1156 | str = get_usb_string(dev->device_handle, string_index); |
| 1157 | if (str) { |
| 1158 | wcsncpy(string, str, maxlen); |
| 1159 | string[maxlen-1] = L'\0'; |
| 1160 | free(str); |
| 1161 | return 0; |
| 1162 | } |
| 1163 | else |
| 1164 | return -1; |
| 1165 | } |
| 1166 | |
| 1167 | |
| 1168 | HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev) |
no test coverage detected