begin

Starts := ReloCS;

StartO := ExelP;

ExelP := HFag.ExelP;

LS := (FileSize(fe)+15) div 16;

ReloCS := LS-HdrSize;

Leng24 := LS*16+LFag+SizeOf(HH)-24;

PageCnt := (Leng24+24+511) div 512;

PartPag :- (Leng24+24) mod 512;

if MinMem < 256 then MinMem :» 256;

if ExeSP < 4096 then ExeSP := 4096;

CheckFile := True end end end; {CheckFile} _•————————————;

Function CorrectName: Boolean;

(Определяет имя очередного защищаемого файла и открывает его} const

FirstName: Boolean = True;

begin

if FirstName then begin

FirstName := Falser-if post'.',NE)=0 then NE := NE+'.exe';

FSplit(NE,d,n,e) ;

FindFirst(NE,$2F,S) ;

if DOSErroroO then

NotAccess(NE) end else

FindNext(S);

if DOSError=0 then begin

NE := d+S.Name;

Assign(fe,NE);

{$!-} Reset(fe,l);

{$!+} if lOResult о 0 then NotAccess(NE) ;

CorrectName := CheckFile;

end else

CorrectName :» False;

end; (CorrectName} {.. —.—————————;

Procedure SetVirFag;

{Устанавливает защиту} vac

p: Pointer;

s: Word;

n: String;

L: Longint;

k: Word;

fb: file;