View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0021899FPCCompilerpublic2012-04-30 20:012012-05-04 03:16
Reportermas 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
StatusnewResolutionopen 
Platformdesktop and laptopOSwindows OS VersionXP & Win 7
Product Version2.4.4Product Build32559 
Target VersionFixed in Version 
Summary0021899: Tregistry access of bluetooth comm ports drops last char
Descriptionwhen accessing window's comm port registry the ReadString() works normally for USB and real hardware but drops the last character for any Bluetooth comm ports. the error is with Windows but a fix is needed anyway.

 
either the striping of the last char is fixed to check before striping or an override flag is needed in the Tregistry so the trailing Null is not striped.
Steps To Reproduceadd a Bluetooth comm port (hardware needed?). see windows fail.
or add a simulated entry elsewhere and access with TRegistry

binary view of working entry
"COM10" = [43,00,4f,00,4d,00,31,00,30,00,00,00]

binary view of bluetooth entry
"COM58" = [43,00,4f,00,4d,00,35,00,38,00]
Additional Information   reg.RootKey := HKEY_LOCAL_MACHINE;
    reg.OpenKeyReadOnly('HARDWARE\DEVICEMAP\SERIALCOMM');//, false);
    reg.GetValueNames(l);
    for n := 0 to l.Count - 1 do begin
// reg.StringSizeIncludesNulls := FALSE; // if I had set access to this..
      v.Add(reg.ReadString(l[n]));
    end;
    Result := v.CommaText;
TagsNo tags attached.
FPCOldBugId
Fixed in Revision
Attached Files

- Relationships

-  Notes
(0059135)
mas (reporter)
2012-04-30 20:06

I included some more data but I do not see it here. flaw in reporting website or is it only accessable by the repairman?
(0059227)
mas (reporter)
2012-05-04 03:16
edited on: 2012-05-04 03:16

I verified that setting StringSizeIncludesNull := FALSE just before the call does GET the full string. (kluge) adding the strings with the extra null to tstring does not hurt anything (my access).
If I fix this issure correctly, do I/can I upload a modified registry file from 2.4.4 ??


- Issue History
Date Modified Username Field Change
2012-04-30 20:01 mas New Issue
2012-04-30 20:06 mas Note Added: 0059135
2012-05-04 03:16 mas Note Added: 0059227
2012-05-04 03:16 mas Note Edited: 0059227



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker