Re: libusb_control_transfer returns LIBUSB_ERROR_IO and GetLastError()=1186 (Win7)

licedey <[email protected]> Wed, 5 Aug 2015 07:56:34 -0700 (MST)
Newsgroups gmane.comp.lib.libusb.devel.windows
Message-ID <[email protected]>
Thank you for the reply. I've tried hidapi library, looks like it works, but 
hid_write() call return "Invalid Parameter" error. However I am using
sources from test project from their site.
How to fix please? Maybe it my USB keyboard error, because of no lib can
read/write to it. I've tried with libusb, Windows HID API, hidapi library.
No success everywhere.

memset(buf,0,sizeof(buf));

// Toggle LED (cmd 0x80). The first byte is the report number (0x1).
buf[0] = 0x1;
buf[1] = 0x81;
res = hid_write(handle, buf, 17);
if (res < 0) { // returns -1
	printf("Unable to write()\n");
	printf("Error: %ls\n", hid_error(handle));
}



--
View this message in context: http://libusb.6.n5.nabble.com/libusb-control-transfer-returns-LIBUSB-ERROR-IO-and-GetLastError-1186-Win7-tp5714945p5714956.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.

------------------------------------------------------------------------------