CopyTIdString problem

Giganews Newsgroups
Subject: CopyTIdString problem
Posted by:  Malcolm (malcolm@spam.will.bounce)
Date: Fri, 22 Sep 2006

Using  indy 10

I am getting a range check error with the following code:

procedure TfrmDisplay.DoControl(ABinding: TIdSocketHandle);
var
  s                          : string;
  AData                      : TIdBytes;
begin
  ...
  s := 'something or other';
  CopyTIdString(s, AData, 0, Length(s));  << error here
  ...
end;

Tried various things but I can't see anything wrong with
this.  What have I missed?  :o(

Malcolm

--

Replies