Improve company productivity with a Business Account.Sign Up
function LocalIP: string;
TaPInAddr = array [0..10] of PInAddr;
PaPInAddr = ^TaPInAddr;
Buffer: array [0..63] of Ansichar;
Result := '';
phe := GetHostByName(Buffer);
if phe = nil then
pptr := PaPInAddr(phe^.h_addr_list);
i := 0;
while pptr^[i] <> nil do
Result := StrPas(inet_ntoa(pptr^[i]^));
procedure TForm1.Button1Click(Sender: TObject);
Open in new window
function LocalIp: string;
var IPW: TIdIPWatch;
Result := '127.0.0.1';
IpW := TIdIPWatch.Create(nil);
if IpW.LocalIP <> '' then
Result := IpW.LocalIP;
ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.
One of a set of tools we're offering as a way to say thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Your question, your audience. Choose who sees your identity—and your question—with question security.