hey leute
Dieser script bewirkt das ich die lokale
IP adresse des pc's herbekomm
Delphi-Quellcode:
function GetLocalIPs(const Lines:TStrings):Boolean;
type
PPInAddr= ^PInAddr;
var
wsaData: TWSAData;
HostInfo: PHostEnt;
HostName: Array[0..255] of Char;
Addr: PPInAddr;
begin
Result:=False;
Lines.Clear;
if WSAStartup($0102, wsaData)=0 then
try
if gethostname(HostName, SizeOf(HostName)) = 0 then Begin
HostInfo:= gethostbyname(HostName);
if HostInfo<>nil then Begin
Addr:=Pointer(HostInfo^.h_addr_list);
if (Addr<>nil) AND (Addr^<>nil) then
Repeat
Lines.Add(StrPas(inet_ntoa(Addr^^)));
inc(Addr);
Until Addr^=nil;
end;
end;
Result:=True;
finally
WSACleanup;
end;
end;
Wie bekomm ich die lokale
IP des WLAN adapers raus?