Zitat von
trifid:
Hallo,
in der Variablen
pcIP steht dann die
IP drinne ...
Delphi-Quellcode:
uses ... sysutils, WinSock, Windows ... ;
var wVersionRequested : Word;
var wsaData : TWSAData;
var Host : PHostEnt;
var caHostName : array[0..128] of char;
var pcIP : PChar;
begin
wVersionRequested := MAKEWORD(1, 1);
WSAStartup (wVersionRequested, wsaData);
GetHostName (@caHostName, 128);
Host := GetHostByName (@caHostName);
pcIP := iNet_ntoa(PInAddr(Host^.h_addr_list^)^);
Was muss man den bei dem Code wieder freigeben?