|
-
October 7th, 2005, 08:30 AM
#1
gethostbyaddr
Hello, when I try to connect with gethostbyname, all works well, but I can't get my program to work with gethostbyaddr.
This is (among others) the code I'm trying now, but it only returns NULL's...
Code:
char *tempHost = strstr(thisHst,".");
LPHOSTENT he;
in_addr iaHost;
iaHost.s_addr = inet_addr("177.16.3.77"); //thisHst
he = gethostbyaddr((const char *)&iaHost, sizeof(struct in_addr), AF_INET);
When I use the PInternetExplorer I can go to the page 'http://177.16.3.77', so the IP-nr. is reachable.
Can anybody help me solve this problem?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|