witam!
mam sobie taki kodzik:
[cpp]
#include <winsock2.h>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
char buff[100];
hostent *lphe;
WSADATA WSAData;
WSAStartup(MAKEWORD(2, 0), &WSAData);
gethostname(buff, 100);
lphe = gethostbyname(buff);
Label1->Caption = AnsiString(inet_ntoa((in_addr)*lphe->h_addr_list));
WSACleanup();
}
[/cpp[
Problem w tym, że wyświetla mi moje wewnętrzne IP. Więc jak zrobić, by mi zwracał moje zewn. IP?