Ignore:
Timestamp:
Aug 23, 2012, 6:43:26 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Update Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/URegistry.pas

    r54 r55  
    1717    rrKeyDynData = HKEY($80000006));
    1818
     19  TRegistryContext = record
     20    RootKey: HKEY;
     21    Key: string;
     22  end;
     23
    1924  { TRegistryEx }
    2025
     
    2934      DefaultValue: Double): Double;
    3035    function DeleteKeyRecursive(const Key: string): Boolean;
     36    function OpenKey(const Key: string; CanCreate: Boolean): Boolean;
    3137  end;
    3238
     39function RegContext(RootKey: HKEY; Key: string): TRegistryContext;
     40
     41
    3342implementation
     43
     44function RegContext(RootKey: HKEY; Key: string): TRegistryContext;
     45begin
     46  Result.RootKey := RootKey;
     47  Result.Key := Key;
     48end;
    3449
    3550{ TRegistryEx }
     
    8398end;
    8499
     100function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean;
     101begin
     102  {$IFDEF Linux}
     103  CloseKey;
     104  {$ENDIF}
     105  Result := inherited OpenKey(Key, CanCreate);
     106end;
     107
    85108function TRegistryEx.ReadBoolWithDefault(const Name: string;
    86109  DefaultValue: Boolean): Boolean;
Note: See TracChangeset for help on using the changeset viewer.