Hello, I found that there is a low probability that usb_open() cannot be opened when using libusb-win32. After analyzing libusb-1.0 and libusbK, I initially judged that the opening mode of CreateFile may cause it to fail to open; libusb-win32 uses exclusive mode; both libusb-1.0 and libusbK are opened in shared mode; why we open it in this way ? can we modify it to shared mode?
Hello, I found that there is a low probability that usb_open() cannot be opened when using libusb-win32. After analyzing libusb-1.0 and libusbK, I initially judged that the opening mode of CreateFile may cause it to fail to open; libusb-win32 uses exclusive mode; both libusb-1.0 and libusbK are opened in shared mode; why we open it in this way ? can we modify it to shared mode?
libusb-win32: CreateFile(dev_name, 0, 0, NULL, OPEN_EXISTING,FILE_FLAG_OVERLAPPED, NULL);
libusb-1.0 handle = CreateFileA(path, access, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
Libusbk CreateFileA(DevicePathStrA, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL)