Re: libusb_claim_interface failed on Windows7
popear <[email protected]> Wed, 17 Aug 2016 18:54:07 -0700 (MST)
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
Thanks for your reply.
I'll paste the error message directly:)
I installed the WinUSB driver with Zadg, and xusb works well without any
error.
But I got my program crashed after the libusb_claim_interface(dev_handle, 2)
return -12, which is LIBUSB_ERROR_NOT_SUPPORTED.
My code is like this:
libusb_init(NULL);
libusb_get_device_list(NULL, devs);
while ((dev = devs[i++]) != NULL )
{
mydev = libusb_get_device_address(dev);//OK
if (XX != mydev)
{
continue;
}
dev_handle = libusb_open_device_with_vid_pid(NULL, myvid, mypid);//OK
libusb_get_configuration(dev_handle, &config);//OK
libusb_calim_interface(dev_handle, myinterface);//return -12 and
crashed.
}
...
It's the right interface which claimed while using libusb-compat-0.1.
Is there any error in my code? Thanks.
--
View this message in context: http://libusb.6.n5.nabble.com/libusb-claim-interface-failed-on-Windows7-tp5715986p5715990.html
Sent from the LibUSB Dev - Win32 mailing list archive at Nabble.com.
------------------------------------------------------------------------------