1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
var
d1,d2,d3 : int64;
FS : TFileStream;
buf : pChar;
pos : int64;
chaine1 : pWideChar;
chaine2 : WideString;
sChaine : WideString;
...
d1 := FS.Position;
FS.Read(buf^, pEntree^.size);
d3 := FS.Position;
sChaine := '';
chaine2 := '';
pos := 0;
chaine1 := pWideChar(AllocMem(SizeOf(WideChar) + 1));
while pos < pEntree^.size do begin
if Ord(buf[pos]) < 128 then begin
chaine2 := chaine2 + buf[pos];
Inc(pos);
end else begin
FS.Seek(d1 + pos,soFromBeginning);
FS.Read(chaine1^,sizeof(WideChar));
chaine2 := chaine2 + chaine1;
pos := pos + 2;
end;
end;
FS.Seek(d3,soFromBeginning);
... |
Partager