This post has NOT been accepted by the mailing list yet.
First Problem:When I want to read/write a libusb32 device on windows. I write following code:
char fileName = "\\\\.\\libusb0-001";
HANDLE fileHandle = CreateFile(fileName, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
It is ok, CreateFile, DeviceIoControl work well. But I got to know fileName can also be usb device symbolic file name. like:
I use it as fileName.
CreateFile is ok, file handle is valid, but DeviceIoControl can't work, GetLastError is 1: ERROR_INVALID_FUNCTION, I'm sure the symbolic name is the device: when I remove the device
CreateFile will failed.
Who can help me to explain it?
2. Second Problem, Why I can't use SetupDiEnumDeviceInterfaces, microsoft recommand code to get
libusb32 device file path. Libusb32 has not device interface GUID?