-
Lex1 (29.01.08 12:57) [0]function WStrLoadFromFile( const Filename: KOLString ): WideString;
var F: THandle;
begin
{$IFDEF WIN}
if StrEq( Filename, 'CON' ) then
Result := File2WStr(GetStdHandle(STD_INPUT_HANDLE))
else
{$ENDIF WIN}
begin
Result := '';
F := FileCreate( Filename, ofOpenRead or ofOpenExisting or ofShareDenyWrite );
if F = INVALID_HANDLE_VALUE then Exit;
Result := File2Str( F );
FileClose( F ); {Dark Knight}
end;
end;
Должно быть File2WStr, а не File2Str