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 a
From Delphi 7 Indy 9 source I find something that solved the problem using GStack
. It's a little bit different from previous post.
function GetLocalIPAddress(List: TStringlist): Integer;
begin
if Assigned(GStack) then
List.Assign(TStringlist(GStack.LocalAddresses))
else
begin
GStack := GStackClass.Create;
List.Assing(TStringlist(GStack.LocalAddresses));
FreeAndNil(GStack);
end;
end;
I think this will work with Indy 10 too.