- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
begin
repeat
if WSAStartup($101, Data) = SOCKET_ERROR then begin
Writeln('Ошибка в WSAStrtup ' , WSAGetLastError);
Break;
end;
repeat
SetLength(Name, 256);
if GetHostName(@Name[1], 256) = SOCKET_ERROR then begin
WriteLn('Ошибка в GetHostName ', WSAGetLastError);
Break;
end;
HE := GetHostByName(@Name[1]);
if HE = nil then begin
WriteLn('Ошибка в GetHostByName ', WSAGetLastError);
Break;
end;
Write('Your inner IP: ');
WriteLn(inet_ntoa(PInAddr(HE.h_addr_list^)^));
Write('Your inner name: ');
WriteLn(HE.h_name);
repeat
MainSocket := Socket(AF_Inet,Sock_Stream,0);
if MainSocket = SOCKET_ERROR then begin
Writeln('Ошибка в Socket ' , WSAGetLastError);
Break;
end;
//
CloseSocket(MainSocket);
until false;
until false;
WSACleanUp;
until false;
end.
Kirinyale 06.04.2011 15:59 # 0
bugmenot 06.04.2011 16:45 # +2
JeremyW 06.04.2011 17:20 # +1
Lure Of Chaos 06.04.2011 22:17 # +4
счастливый грузин
guest 07.04.2011 10:51 # −4