. . . .
. . . .
Last edited by newb; 31st May 2010 at 15:39.
Hi...
the application comes and prints this
"\\?\usb#vid_04f2&pid_0111#5&1ba5a77f&0&2#{a5dcbf1 0-6530-11d2-901f-00c04fb951ed}"
again it goes to while loop ....
here it gets breaked in the else statement...
Qt Code:
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { // Change the buffer size. if (buffer) LocalFree(buffer); buffer = (LPTSTR)LocalAlloc(LPTR,buffersize); } else { qDebug ()<<"Here it quits the application"; // Insert error handling here. break; }To copy to clipboard, switch view to plain text mode
Any ideas in this....
Last edited by newb; 31st May 2010 at 12:49.
Hello Qt Experts....
Kindly guide me on my problem...
Say, did you write that code or copy it from somewhere? As you don't seem to understand how it works?
Secondly, why are you expecting the call to fail with an insufficient buffer error code? Surely having a sufficient buffer size is a good thing, rather than a bad one?
Actually i want to get the vendor id and product id of a usb device which is get plugged....
i searched for Qt related implementation but i don seem to get any sample source code .
So i searched forums and links for that..
so i referred the links and followed the code they have used ..
Any ideas
Ok, well if you use what I say in post #8, that will tell you when a device is plugged/unplugged, which seems to be what you want.
If you google it, there will no doubt be lots of other people who have used it, and thus example code.
Bookmarks