| 679 | } |
| 680 | |
| 681 | static wchar_t *hid_internal_UTF8toUTF16(const char *src) |
| 682 | { |
| 683 | wchar_t *dst = NULL; |
| 684 | int len = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, src, -1, NULL, 0); |
| 685 | if (len) { |
| 686 | dst = (wchar_t*)calloc(len, sizeof(wchar_t)); |
| 687 | if (dst == NULL) { |
| 688 | return NULL; |
| 689 | } |
| 690 | MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, src, -1, dst, len); |
| 691 | } |
| 692 | |
| 693 | return dst; |
| 694 | } |
| 695 | |
| 696 | static struct hid_device_info *hid_internal_get_device_info(const wchar_t *path, HANDLE handle) |
| 697 | { |
no outgoing calls
no test coverage detected