Recent

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

mas steindorff

  • Sr. Member
  • ****
  • Posts: 444
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 7/10 - laz 2.0 / 1.2.6 general releases

mas steindorff

  • Sr. Member
  • ****
  • Posts: 444
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 7/10 - laz 2.0 / 1.2.6 general releases

 

TinyPortal © 2005-2018