You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
Thanks in advance!
PS: if my tone seems annoyed, I'm just tired, so pardon that.
The text was updated successfully, but these errors were encountered: