Ignore:
Timestamp:
Aug 6, 2019, 1:55:55 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Use fcl registry.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Registry/UGeneralRegistry.pas

    r392 r538  
    66
    77uses
    8   Classes, SysUtils, IniFiles, XMLRead, XMLWrite, DOM
    9   {$IFDEF Windows}
    10   , WinRegistry
    11   {$ENDIF};
     8  Classes, SysUtils, IniFiles, XMLRead, XMLWrite, DOM, Registry;
    129
    1310type
     
    246243function TWinRegistry.GetKeyInfo(var Value: TRegKeyInfo): Boolean;
    247244var
    248   KeyInfo: WinRegistry.TRegKeyInfo;
     245  KeyInfo: Registry.TRegKeyInfo;
    249246begin
    250247  Result := Registry.GetKeyInfo(KeyInfo);
     
    262259function TWinRegistry.GetValueInfo(const Name: string; var Value: TRegValueInfo): Boolean;
    263260var
    264   ValueInfo: WinRegistry.TRegDataInfo;
     261  ValueInfo: Registry.TRegDataInfo;
    265262begin
    266263  Result := Registry.GetDataInfo(Name, ValueInfo);
     
    399396
    400397procedure TWinRegistry.GetKeyNames(Strings: TStrings);
     398var
     399  I: Integer;
    401400begin
    402401  Registry.GetKeyNames(Strings);
     402//  for I := 0 to Strings.Count - 1 do
     403//    Strings[I] := AnsiToUtf8(Strings[I]);
    403404end;
    404405
     
    687688  {$IFDEF Windows}
    688689  Backend := TWinRegistry.Create;
    689   //TWinRegistry(Backend).RootKey := HKEY_CURRENT_USER;
    690   //TWinRegistry(Backend).BaseKey := 'Software\' + CompanyName + '\' +
    691   //  ApplicationName;
     690  TWinRegistry(Backend).CurrentRoot := HKEY_CURRENT_USER;
     691  TWinRegistry(Backend).CurrentKey := 'Software\Company\' +
     692    ApplicationName;
     693//  TWinRegistry(Backend).CurrentKey := 'Software\' + VendorName + '\' +
     694//    ApplicationName;
    692695  {$ENDIF}
    693696  {$IFDEF Linux}
Note: See TracChangeset for help on using the changeset viewer.