Any one know a way in delphi get a simple list (eg tstrings) of the local ip address.
I have had a look at the other related question, and cant seem to get my head around converting them to delphi.
in indy 9, there is a unit IdStack, with the class TIdStack
fStack := TIdStack.CreateStack;
try
edit.caption := fStack.LocalAddress; //the first address i believe
ComboBox1.Items.Assign(fStack.LocalAddresses); //all the address'
finally
freeandnil(fStack);
end;
works great :)
from Remy Lebeau's Comment
The same exists in Indy 10, but the code is a little different:
TIdStack.IncUsage;
try
GStack.AddLocalAddressesToList(ComboBox1.Items);
Edit.Caption := ComboBox1.Items[0];
finally
TIdStack.DecUsage;
end;