|
-
Dec 14th, 1999, 01:49 AM
#1
I need some assistance with some visual basic code I am trying to implement. I am trying to call a Winsock method (gethostbyaddr). I want to pass it the variable "IP_Address" and extract the data that the method should return. I have built my data structure (TYPE hostent) but do not know how to return data into that structure. Can you point me in the right direction or give me a resource? Thanks.
------------------
Jeffrey S. Russell
-
Dec 16th, 1999, 03:49 AM
#2
Not really helpful. I have plenty of "C" code to look at, but not to worry. I finally figured out how to get the function to work. Thanks anyhow for the assist!
-
Dec 16th, 1999, 12:39 PM
#3
Member
Here's some C-Code, translating it should be that hard. Hope that helps,
-----------------------------------------------------------------
long ip;
ip = inet_addr("YourComputerName");
HOSTENT *ho = gethostbyaddr((char *)&ip, 4, AF_INET);
if (ho == NULL)
{
printf("Host not found.\n");
return;
}
printf("%s\n", ho->h_name);
-----------------------------------------------------------------
regards,
Björn
------------------
EMAIL: [email protected]
PAGE: <A HREF="http://members.xoom.com/sharetools
" TARGET=_blank>http://members.xoom.com/sharetools
</A>
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
|