我按照“如何访问 USB 设备”的指南 http://msdn.microsoft.com/en-us/library/ff540174.aspx
//Open the device
//lpDevicePath is '\\?\usb#vid_4255&pid_1000#123456789abc#{a5dcbf10-6530-11d2-901f-00c04fb951ed}'
*hDeviceHandle = CreateFile (
lpDevicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_ALWAYS,
FILE_FLAG_OVERLAPPED,
NULL);
这一步之后,*hDeviceHandle
不是INVALID_HANDLE_VALUE
。
然后,我打电话WinUsb_Initialize(hDeviceHandle, phWinUSBHandle)
但它返回错误50,有人知道如何解决吗?