Hello,
i have following code from 3rd part:
{$MODE DELPHI } // <--- it is compiled with Delphi-Mode
// PDataSetRecInfo ist Pointer to Record TDataSetRecInfo
// aBuffer is PChar
// dsRecInfoOfs is Integer;
//..
with PDataSetRecInfo(aBuffer + dsRecInfoOfs)^ do begin
riBookmarkFlag := bfCurrent; //sometimes error here
riRecNo := 0;
end;
//..
Sometimes the programm crashs with Errorcode:
<TDataSetRecInfo>= cannot access memory at adress 0x58It tried without success:
{$MODE DELPHI } // <--- it is compiled with Delphi-Mode
if PDataSetRecInfo(aBuffer + dsRecInfoOfs)<>nil then //don't helps, it passes every time
with PDataSetRecInfo(aBuffer + dsRecInfoOfs)^ do begin
riBookmarkFlag := bfCurrent; //sometimes error here
riRecNo := 0;
end;
Does anyone know how can I catch this Error or check to nil?