procedure TForm1.FormCreate(Sender: TObject);
var
S : String;
lpReOpenBuff: TOFStruct;
h : THandle;
lpNumberOfBytesRead: DWORD;
begin
h := OpenFile('c:/p.txt', lpReOpenBuff, OF_READ);
if h <> HFILE_ERROR then
begin
SetFilePointer(h, 580, nil, FILE_BEGIN);
SetLength(S, 590 - 580);
ReadFile(h, PChar(S)^, 590 - 580, lpNumberOfBytesRead, nil);
CloseHandle(h);
end;
end;