-
Notifications
You must be signed in to change notification settings - Fork 907
Open
Description
Is there any way to convert from type hid_device to type HANDLE, I'm having issues with with hid_write() so have decided to use HidD_SetOutputReport(), which requests a variable of type HANDLE, which hid_device is incompatible with. I'm just wondering if there is a way to convert from hid_device to HANDLE.
void Write(hid_device* handle, unsigned char buf[0x21]) //handle is assigned in main(), yes it is done properly, you can read data however it isn't useful unless it is polled due to the devices protocol
{
if (HidD_SetOutputReport(handle, buf, 0x21)) //Returns with false
{
cout << "write succeeded";
}
else
{
cout << "failed with code: " << GetLastError(); //Returns "failed with code: 6" which means invalid handle.
}
}
Thanks in advance!
PS: if my tone seems annoyed, I'm just tired, so pardon that.
Metadata
Metadata
Assignees
Labels
No labels