10.01.2014, 08:25
|
|
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
а в чем проблема чуточку руками кода написать?)
Код:
var
f: THandle;
buf: array [0..$ffff] of Byte;
dummy: Cardinal;
begin
f:=CreateFile('Unit1.txt', GENERIC_READ, 0, nil, OPEN_EXISTING, 0, 0);
try
if not ReadFile(f, buf, $fffe, dummy, nil) then raise Exception.Create('!ReadFile');
if dummy<2 then raise Exception.Create('!null');
buf[dummy]:=$00;
buf[dummy+1]:=$00;
if (buf[0]<>$ff) or (buf[1]<>$fe) then raise Exception.Create('!Oops');
SendMessageW(RichEdit1.Handle, WM_SETTEXT, 0, Integer(PChar(@buf[2])));
finally
CloseHandle(f);
end;
end;
http://zalil.ru/34890307
__________________
Пишу программы за еду.
__________________
|