hid_get_indexed_string method

int hid_get_indexed_string(
  1. Pointer<hid_device> dev,
  2. int string_index,
  3. Pointer<WChar> string,
  4. int maxlen,
)

@brief Get a string from a HID device, based on its string index.

@ingroup API @param dev A device handle returned from hid_open(). @param string_index The index of the string to get. @param string A wide string buffer to put the data into. @param maxlen The length of the buffer in multiples of wchar_t.

@returns This function returns 0 on success and -1 on error. Call hid_error(dev) to get the failure reason.

Implementation

int hid_get_indexed_string(
  ffi.Pointer<hid_device> dev,
  int string_index,
  ffi.Pointer<ffi.WChar> string,
  int maxlen,
) {
  return _hid_get_indexed_string(
    dev,
    string_index,
    string,
    maxlen,
  );
}