na pokracovani
function ScanFile( Const filename : String; Const forString : String; caseSensitive : Boolean ): LongInt;
Const
BufferSize= $8001;
Var
pBuf, pEnd, pScan, pPos : Pchar;
filesize : LongInt;
bytesRemaining : LongInt;
bytesToRead : Integer;
F : File;
SearchFor : Pchar;
oldMode : Word;
Begin
Result := -1;
If (Length(forString) = 0) or (Length(filename) = 0) Then Exit;
SearchFor := Nil;
pBuf := Nil;
AssignFile( F, filename );
oldMode := FileMode;
FileMode := 0;
Reset( F, 1 );
FileMode := oldMode;
Const
BufferSize= $8001;
Var
pBuf, pEnd, pScan, pPos : Pchar;
filesize : LongInt;
bytesRemaining : LongInt;
bytesToRead : Integer;
F : File;
SearchFor : Pchar;
oldMode : Word;
Begin
Result := -1;
If (Length(forString) = 0) or (Length(filename) = 0) Then Exit;
SearchFor := Nil;
pBuf := Nil;
AssignFile( F, filename );
oldMode := FileMode;
FileMode := 0;
Reset( F, 1 );
FileMode := oldMode;
<< Home