![]() |
pResolveDNS() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Private Function |
Declared in: SpoofSocket.h |
sockaddr_in pResolveDNS( LPCSTR lpAddress);
Reseolve DNS
//Convert it to the address sockaddr_in adr; memset(&adr,0,sizeof(adr)); try { //Resolve the DNS hostent* hp; hp=gethostbyname(lpAddress); //Check if this address exists if (!hp) //Error SetLastError("pResolveDNS"); else //Copy the data memcpy(&adr.sin_addr,hp->h_addr,hp->h_length); return adr; } ERROR_HANDLER_RETURN("pResolveDNS",adr)
![]() |
Site content copyright © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001. |