Recent

Author Topic: TRegistry failure with Serial com keys added by Bluetooth  (Read 3237 times)

mas steindorff

  • Hero Member
  • *****
  • Posts: 533
TRegistry failure with Serial com keys added by Bluetooth
« on: April 28, 2012, 02:08:14 am »
When I do a TRegistry.readstring on an entry added by window's Blue-tooth (BT) driver, I end up missing the last char.  I looked at the registry and indeed, there is a trailing set of nulls for the normal comports but not for the BT ones.  in Tregistry there is a private Boolean "FStringSizeIncludesNull" that must be getting fooled into thinking the BT ports need striped by one.  since it is read only I can not change it.

what's the best fix for this?
windows 10 &11, Ubuntu 21+ IDE 3.2.2 general releases

mas steindorff

  • Hero Member
  • *****
  • Posts: 533
Re: [solved] TRegistry failure with Serial com keys added by Bluetooth
« Reply #1 on: May 04, 2012, 02:58:06 am »
here's what I ended up doing (and it works)
1: copied the registry.pp from the correct fpc path into my project Dir.  renamed it to uRegFix.pas and included it in my project.  added the fix to this file and used it as a replacement for registry.

2:< error: can not include file regdef.inc>
went into project options paths and added
"$(LazarusDir)fpc\2.4.4\source\packages\fcl-registry\src"
I would have liked to use $FPCSrcDir but I could not get it to find the path. likely due to it's missing from the SET options in my environment???

Now the project compiles with a working TRegistry object on all of the companies computers without needing to fix each of them at the compiler level.

:)
[open software.  if you don't like it then fix it (and send a bug report)] 
:)
windows 10 &11, Ubuntu 21+ IDE 3.2.2 general releases

 

TinyPortal © 2005-2018