One possible solution, I defined a temporary RawByteString and now it
returns correct result.
I have tested it on DelphiXE and BDS2006.

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *}
function THttpConnection.HtmlPageProducerToString(
    const HtmlFile : String;
    UserData       : TObject;
    Tags           : array of const) : String;
var
    Stream : TMemoryStream;
    {$IFDEF COMPILER12_UP}
    S : RawByteString;
    {$ELSE}
    S : String;
    {$END}
begin
    Stream := TMemoryStream.Create;
    try
        HtmlPageProducerToStream(HtmlFile, UserData, Tags, Stream);
        SetLength(S, Stream.Size);
        Stream.Seek(0, 0);
        Stream.Read(S[1], Stream.Size);
        Result := S;
    finally
        Stream.Free;
    end;
end;

Regards
Peter

A(z) kimenő üzenetben nem található vírus.
Ellenőrizte: AVG - www.avg.com
Verzió: 9.0.872 / Vírus adatbázis: 271.1.1/3400 - Kiadás dátuma: 01/24/11 
08:35:00
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to