Convert Host name to IP address
-
In a network , if I give a system name , how to get the IP address of that system. Is there any MFC class to find that? Ayesha
-
In a network , if I give a system name , how to get the IP address of that system. Is there any MFC class to find that? Ayesha
Look here[^] In the example given you will see a line like
//get the IPAddress
hstEnt = gethostbyname(szHostName);Change
szHostName
to the name of the network machine. You can modify the function allowing it to take the name of the machine as input.
Nibu thomas A Developer Programming tips[^] My site[^]
-
In a network , if I give a system name , how to get the IP address of that system. Is there any MFC class to find that? Ayesha
Ayesha Farheen wrote:
if I give a system name , how to get the IP address of that system
Is gethostbyname is any use!
Ayesha Farheen wrote:
Is there any MFC class to find that?
there is not class associated with same
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV