Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.05.26;
Скачать: CL | DM;

Вниз

Как узнать в Вин IP адрес?   Найти похожие ветки 

 
трям   (2003-03-26 01:12) [0]

желательно на API:)


 
трям   (2003-03-26 01:19) [1]

и без winsocka !:)


 
Alex Konshin ©   (2003-03-26 01:40) [2]

и без tcp/ip!:)


 
Landgraph   (2003-03-26 14:18) [3]

про udp забыли =)


 
Smithson ©   (2003-03-26 15:25) [4]


function GetIPaddress: String;
const bufsize = 255;
var WSA: WSAData;
buf: pointer;
RemoteHost : PHostEnt; (* No, don"t free it! *)
D: record
case Byte of
0: ( L: LongInt );
1: ( B: Array[0..3] of byte );
end;
Begin
WSAStartUp($101,WSA);
buf:=NIL;
try
getmem(buf,bufsize);
winsock.gethostname(buf,bufsize); (* this one maybe without domain *)
RemoteHost:=Winsock.GetHostByName(buf);
if RemoteHost=NIL then
Result := "No TCP/IP" (* 127.0.0.1 *)
else begin
D.L := longint(pointer(RemoteHost^.h_addr_list^)^);
Result := IntToStr(D.B[0])+"."+IntToStr(D.B[1])+"."+IntToStr(D.B[2])+"."+IntToStr(D.B[3]);
end;
finally
if buf <> NIL then freemem(buf,bufsize);
end;
WSACleanup();
End;



Страницы: 1 вся ветка

Текущий архив: 2003.05.26;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.013 c
3-83419
AlexVitko
2003-05-06 18:25
2003.05.26
ПОИСК В БООЛЬШОЙ БД


14-83658
GOOD
2003-05-03 03:58
2003.05.26
ВНИМАНИЕ!! НЕ ВЕРЬТЕ РЕФИРАЛАМ НЕ поддавайтесь обману! ВНИМАНИЕ!!


3-83334
igor
2003-05-05 13:32
2003.05.26
Глюки ADO


3-83412
pok
2003-05-06 18:13
2003.05.26
Update одной таблице по результатам другой....


1-83584
grusty
2003-05-14 10:48
2003.05.26
Выполнение процедуры после открытия формы.