anchor.diff:    c : Cardinal;
     i64 : Int64;
   begin
  -  TStreamOp.WriteAnsiString(Stream,FParamName);
  +  Internal_WriteBytes(Stream,TEncoding.ANSI.GetBytes(FParamName));
     b := Byte(FParamType);
     Stream.Write(b,1);
     if IsNull then begin
  
positive.code: interface
  
  uses
    Classes;
  
  Type
    TAppParamType = (ptString, ptInteger, ptLongWord, ptInt64, ptBoolean, ptStream);
  
    TAppParams = Class;
  
    TAppParam = Class
      FAppParams : TAppParams;
      Function LoadFromStream(Stream : TStream) : Boolean;
      Procedure SaveToStream(Stream : TStream);
    private
      FParamName: AnsiString;
      FValue: Variant;
      FParamType: TAppParamType;
      procedure SetParamName(const Value: AnsiString);
      procedure SetValue(const Value: Variant);
      procedure SetParamType(const Value: TAppParamType);
      function GetIsNull: Boolean;
    protected
    published
    public
      Constructor Create(AParamName : AnsiString);
      Property ParamName : AnsiString read FParamName write SetParamName;
      Property Value : Variant read FValue write SetValue;
      Property ParamType : TAppParamType read FParamType write SetParamType;
      Procedure SetAsInteger(IntValue : Integer);
      Procedure SetAsCardinal(CardValue : Cardinal);
      Procedure SetAsString(StringValue : AnsiString);
      Procedure SetAsInt64(Int64Value : Int64);
      Procedure SetAsBoolean(BoolValue : Boolean);
      Procedure SetAsStream(Stream : TStream);
      Property IsNull : Boolean read GetIsNull;
      function GetAsString(Const DefValue : AnsiString): AnsiString;
      function GetAsBoolean(Const DefValue : Boolean): Boolean;
      function GetAsInteger(Const DefValue : Integer): Integer;
      function GetAsInt64(Const DefValue : Int64): Int64;
      function GetAsStream(Stream : TStream) : Integer;
    End;
  
    TAppParams = Class(TComponent)
    private
      FParamsStream : TFileStream;
      FParams : TList;
      FFileName: AnsiString;
      Function LoadFromStream(Stream : TStream) : Boolean;
      Procedure SaveToStream(Stream : TStream);
      function GetParam(ParamName: AnsiString): TAppParam;
      Procedure InternalClear;
      Function IndexOfParam(Const ParamName : AnsiString) : Integer;
      procedure SetFileName(const Value: AnsiString);
      Procedure Save;
    protected
    public
      Constructor Create(AOwner : TComponent); override;
      Destructor Destroy; override;
      Class function AppParams : TAppParams;
      Property FileName : AnsiString read FFileName write SetFileName;
      Property ParamByName[ParamName : AnsiString] : TAppParam read GetParam;
      Procedure Clear;
      Procedure Delete(Const ParamName : AnsiString);
      Function Count : Integer;
      Function Param(index : Integer) : TAppParam;
      Function FindParam(Const ParamName : AnsiString) : TAppParam;
    End;
  
  implementation
  
  uses
    Variants, UAccounts, SysUtils;
  
  Const
    CT_AppParams_File_Magic = 'TAppParams';
  
  Var _appParams : TAppParams;
  
  { TAppParam }
  
  constructor TAppParam.Create(AParamName: AnsiString);
  begin
    FAppParams := Nil;
    FParamName := AParamName;
    FValue := Null;
  end;
  
  function TAppParam.GetAsBoolean(const DefValue: Boolean): Boolean;
  
negative.code:   Result := P;
  end;
  
  function TAppParams.IndexOfParam(const ParamName: String): Integer;
  begin
    for Result := 0 to FParams.Count - 1 do begin
      if AnsiSameText(ParamName,TAppParam(FParams[Result]).ParamName) then exit;
  