MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / hid_get_indexed_string

Function hid_get_indexed_string

dependencies/hidapi/hidapi.c:1152–1165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1150}
1151
1152int 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
1168HID_API_EXPORT const wchar_t * HID_API_CALL hid_error(hid_device *dev)

Callers 6

EVGAMouseControllerMethod · 0.85
CMMMControllerMethod · 0.85
CMMM711ControllerMethod · 0.85
hid_get_product_stringFunction · 0.85

Calls 1

get_usb_stringFunction · 0.85

Tested by

no test coverage detected