EugeneBoss03
Турист
- Credits
- 0
Знатоки, подскажите в чём косяк в ApCommon.pas из Apollo VCL 6.1 Eval?
function InternalBreakRecords(pMem: TMemoryStream;
var BOF: Boolean;
var EoF: Boolean;
var RecNo: Integer;
var RowNo: Integer;
var OrderPosGet: Double;
var ActiveBuffer: PChar;
const RecSize : Integer):Boolean;
var
Buff : Array [0..12] of char;
begin
RowNo := -4;
if (pMem <> nil) and (pMem.Position < pMem.Size) then
begin
pMem.Read( PChar(@buff)^, 1);
buff[1] := #0;
BOF := YNToLogical(buff);
pMem.Read( PChar(@buff)^, 1);
buff[1] := #0;
EOF := YNToLogical(buff);
pMem.Read( PChar(@buff)^, 8);
buff[8] := #0; // Physical RecNo
RecNo := StrToInt('$'+Buff); - несовместимый тип!
pMem.Read( PChar(@buff)^, 8);
buff[8] := #0;
RowNo := StrToInt('$'+Buff); - несовместимый тип!
pMem.Read( PChar(@buff)^, 12);
buff[12] := #0; // OrderGetPos
OrderPosGet := StrToFloat(buff);
pMem.Read( PChar(ActiveBuffer)^, RecSize); // Active Buffer itself
end;
if RowNo = -4
then Result := FALSE
else Result := TRUE;
end;
function InternalBreakRecords(pMem: TMemoryStream;
var BOF: Boolean;
var EoF: Boolean;
var RecNo: Integer;
var RowNo: Integer;
var OrderPosGet: Double;
var ActiveBuffer: PChar;
const RecSize : Integer):Boolean;
var
Buff : Array [0..12] of char;
begin
RowNo := -4;
if (pMem <> nil) and (pMem.Position < pMem.Size) then
begin
pMem.Read( PChar(@buff)^, 1);
buff[1] := #0;
BOF := YNToLogical(buff);
pMem.Read( PChar(@buff)^, 1);
buff[1] := #0;
EOF := YNToLogical(buff);
pMem.Read( PChar(@buff)^, 8);
buff[8] := #0; // Physical RecNo
RecNo := StrToInt('$'+Buff); - несовместимый тип!
pMem.Read( PChar(@buff)^, 8);
buff[8] := #0;
RowNo := StrToInt('$'+Buff); - несовместимый тип!
pMem.Read( PChar(@buff)^, 12);
buff[12] := #0; // OrderGetPos
OrderPosGet := StrToFloat(buff);
pMem.Read( PChar(ActiveBuffer)^, RecSize); // Active Buffer itself
end;
if RowNo = -4
then Result := FALSE
else Result := TRUE;
end;
Последнее редактирование модератором: