Hi, all!
First of all I want to tell "Thanks" for this example!
Now I write project for using Magnetic Stripe Reader that recognized by Windows as USB HID Device:
##?#HID#VID_1136&PID_3003#6&2b575f1c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
##?#HID#VID_1136&PID_3003#6&2b575f1c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
To copy to clipboard, switch view to plain text mode
But in this example it always return INVALID_HANDLE_VALUE in usbexample.cpp:273 on:
ReadHandle = CreateFile((DetailedInterfaceDataStructure->DevicePath), GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
ReadHandle = CreateFile((DetailedInterfaceDataStructure->DevicePath), GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, 0);
To copy to clipboard, switch view to plain text mode
And DevicePath is correct:
qDebug
() <<
QString::fromWCharArray(DetailedInterfaceDataStructure
->DevicePath
);
qDebug() << QString::fromWCharArray(DetailedInterfaceDataStructure->DevicePath);
To copy to clipboard, switch view to plain text mode
return
\\?\hid#vid_1136&pid_3003#6&2b575f1c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
\\?\hid#vid_1136&pid_3003#6&2b575f1c&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
To copy to clipboard, switch view to plain text mode
What's wrong?
Bookmarks