uses
...., winsock;
function GetMyInternetIP: string;
type
TaPInAddr = array[0..10] of PInAddr;
PaPInAddr = ^TaPInAddr;
var
phe : PHostEnt;
pptr : PaPInAddr;
s : array[0..128] of char;
I : Integer;
GInitData : TWSADATA;
begin
WSAStartup($101, GInitData);
Result := '';
GetHostName(@s, 128);
phe := GetHostByName(s);
if phe = nil then
Exit;
pptr := PaPInAddr(Phe^.h_addr_list);
I := 0;
while pptr^ <> nil do
begin
Result := StrPas(inet_ntoa(pptr^^));
Inc(I);
end;
WSACleanup;
end;