Developers/Delphi[델파이] IT.러쉬맥
function Tdm.Get_LocalIP: String; var WSAData : TWSAData; HostName: String; HostEnt : pHostEnt; begin WSAStartup(2, WSAData); SetLength(HostName, 255); GetHostName(PChar(HostName), 255); SetLength(HostName, StrLen(PChar(HostName))); HostEnt := GetHostByName(PChar(HostName)); if Assigned(HostEnt) then with HostEnt^ do Result := Format('%d.%d.%d.%d', [Byte(h_addr^[0]), Byte(h_addr^[1]), Byte(h_add..