PDA

View Full Version : Help with QExtSerialPort libary[Qt4]



ZenT
4th August 2012, 12:21
Hello everyone!

i'm actually stuck pretty much for the last hours(!) make my application work but i still had no luck...
I've looked everywhere on the web and i'm very frustrated of this.
Here's the problem:

I need to develop a software that detects when a USB drive is plugged in the a computer, get it's friendly name & drive letter
and copy some data from a folder which is pointed by the volume label. The main problem is that i tried all libraries i could find
including qt's 2 other ones, but i had no luck. I found out that QExtSerialPort actually fit for my needs so i tried to build it
and got the .dll & .a files. I compile my project, everything ok, but when i call the getPorts() function the QList is not filled.
It's like i never called the function. I checked everything that could cause this but i cannot find it...
So the main thing is: I call getPorts() and i get no ports at all, even though i have a USB drive connected to my computer along
with a mouse.

What could be the cause for a static function not working well?
I beg for your help cause i'm really confused... :S

Naahmi
4th August 2012, 14:11
Hello,

have you try to use the Example? http://code.google.com/p/qextserialport/source/browse/examples/enumerator/main.cpp

ZenT
4th August 2012, 14:20
hi, thanks for your reply.
I try it but it returns empty... :(
"List of ports: "


EDIT: Managed to find a workaround: I used a libarary called QDeviceWatcher to get usb connect/disconnect/changed signals
and the drive letter, then i pass the drive letter to WinAPI GetVolumeInformation() to get the drive label.


please lock :)