erewalk / qextserialport

Automatically exported from code.google.com/p/qextserialport
Other
0 stars 0 forks source link

Corrupted port info on Windows when SetupDiGetDeviceRegistryProperty returns an error #167

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of QextSerialPort are you using?
commit 0394a5d33beb7f585b5c9dfac7967e6f67389006

What steps will reproduce the problem?
1. Enumerate unusual devices in Windows (ex: com0com virtual port pairs not 
using ports class)
2. Inspect port info (specifically friendlyName), find uninitialized memory 
blocks. 

What is the expected output? What do you see instead?
Expected: empty QString when the device does not contain or returns an error 
for a specific property. We further prevent adding devices to the enumeration 
list that do not provide all queried properties, however some users may require 
devices with partial data to be included in the results so I have not included 
that functionality in the attached patch. 

What version of the product are you using? On what operating system?
Windows 7 32 and 64 bit.

Please provide any additional information below.
A patch to fix the issue is attached.

Original issue reported on code.google.com by nweib...@gmail.com on 8 Jul 2013 at 8:49

Attachments:

GoogleCodeExporter commented 9 years ago
Attaching patch with UTF-8 encoding, my apologies 

Original comment by nweib...@gmail.com on 8 Jul 2013 at 8:57

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dbzhang...@gmail.com on 9 May 2014 at 8:21