Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Aug : TidSimplyBuffer in Indy 10

www.cryer.info
Managed Newsgroup Archive

TidSimplyBuffer in Indy 10

Subject:TidSimplyBuffer in Indy 10
Posted by:"Kiwi" (gl..@custommadesoftware.co.nz)
Date:Thu, 10 Aug 2006 15:40:31 +1200

I have some code written using delphi 7 Indy 9 and for some reason I have a
reference to a TidSimplyBuffer that was declared in idTCPConnection -
however this doesnt seem to be in Indy 10.  Here is the code that is using
it...
function StreamToHex(S: TStream): String;
var
  I: Integer;
  B: Byte;
  St: String;
begin
  Result:= '';
  for I:= 0 to S.Size -1 do
  begin
    B:= Ord(PChar(TidSimpleBuffer(S).Memory)[I]);
    St:= Format('%x', [B, 2]);
    while Length(St) < 2 do St:= '0' + St;
    Result:= Result + St;
  end;
end;

Maybe there is another way?
Thanks in advance

Replies:

www.cryer.info
Managed Newsgroup Archive