Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-11

Indy example returns Runtime Error (211)

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

I am trying to use an Indy example from stackoverflow - http://stackoverflow.com/questions/576538/delphi-how-to-get-all-local-ipsand I always get Runtime Error (211). It is more of a language issue than a
network related question, which is why I am reposting it here.

Is it due to some difference between Delphi and Free Pascal

 idStack := TIdStack.Create;
Show quoted text 11 lines
TIdStack.IncUsage; try network := idStack.LocalAddress; mmoResults01.Lines.Assign(idStack.LocalAddresses); //PrintLines(idStrings); finally TIdStack.DecUsage; end; FreeAndNil(idstack);

Any ideas?

Frank Church ======================= http://devblog.brahmancreations.com

Reply by email

Frank Church
to Frank Church
Frank Church wrote 23 lines
I am trying to use an Indy example from stackoverflow - http://stackoverflow.com/questions/576538/delphi-how-to-get-all-local-ipsand I always get Runtime Error (211). It is more of a language issue than a network related question, which is why I am reposting it here. Is it due to some difference between Delphi and Free Pascal idStack := TIdStack.Create; > TIdStack.IncUsage; > try > network := idStack.LocalAddress; > mmoResults01.Lines.Assign(idStack.LocalAddresses); > //PrintLines(idStrings); > finally > > TIdStack.DecUsage; > end; > FreeAndNil(idstack); > > Any ideas?

Any updates? I don't know if I have to subclass or derive something to avoid this error. I will post some sample code for testing.

Show quoted text 6 lines
-- Frank Church ======================= http://devblog.brahmancreations.com
Frank Church ======================= http://devblog.brahmancreations.com

Reply by email

Marco van de Voort
to Frank Church

In our previous episode, Frank Church said:

Show quoted text 5 lines
> Any ideas? > > Any updates? I don't know if I have to subclass or derive something to avoid this error. I will post some sample code for testing.

Did you look into my suggestion on the forum to try to add a binding to the bindings property ? IIRC problems with indy9->indy10 conversions usually are due to that.

Reply by email

Frank Church
to Marco van de Voort
Marco van de Voort wrote 12 lines
In our previous episode, Frank Church said: > > Any ideas? > > > > > Any updates? I don't know if I have to subclass or derive something to > avoid this error. I will post some sample code for testing. Did you look into my suggestion on the forum to try to add a binding to the bindings property ? IIRC problems with indy9->indy10 conversions usually are due to that. _____

It appears that unless GStack.AddLocalAddressesToList was some kind of pseudocode it wasn't implemented in my version of Indy.

procedure TForm1.Button2Click(Sender: TObject);
begin
  TIdStack.IncUsage;
  try
    //GStack.AddLocalAddressesToList(ComboBox1.Items);
    ComboBox1.Items.Assign(GStack.LocalAddresses);
    Edit1.Caption := ComboBox1.Items[0];
  finally
    TIdStack.DecUsage;
  end;
end;
__________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Frank Church ======================= http://devblog.brahmancreations.com

Reply by email