Tregistry access of bluetooth comm ports drops last char
Original Reporter info from Mantis: mas steindorff
-
Reporter name: mas
Original Reporter info from Mantis: mas steindorff
- Reporter name: mas
Description:
when 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 reproduce:
add 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;
Mantis conversion info:
- Mantis ID: 21899
- OS: windows
- OS Build: XP & Win 7
- Build: 32559
- Platform: desktop and laptop
- Version: 2.4.4
- Fixed in version: 3.0.0
- Fixed in revision: 29217 (#3e24a9eb)
- Monitored by: » Thorsten Schmidt (Thorsten Schmidt), » robert.angermayr (Robert Angermayr), » dezlov (Denis Kozlov)