Is there any Win32 API call to get the local machine IP adress if its connected to the network?
Thanks.
Printable View
Is there any Win32 API call to get the local machine IP adress if its connected to the network?
Thanks.
Yes, you can use gethostbyname on the result of gethostname to retrieve
the IP addresses of the local machine. See this post for a sample
http://codeguru.earthweb.com/cgi-bin...&Number=173042