To get the IP Address of Machine with Windows 95 as OS
Posted on 1999-06-30
I want to get the IP Address of the machine which is
having Windows 95 as OS. The below given code snippet
helps me to get the IP address for machines
having Windows 98 or Windows NT as OS.
Expecting your response.
Thanks in advance.
//code Snippet starts here----
char * ip;
wVersionRequested = MAKEWORD( 2, 0 );
if ( WSAStartup( wVersionRequested, &wsaData ) == 0 )
if( gethostname ( name, sizeof(name)) == 0)
if((hostinfo = gethostbyname(name)) != NULL)
ip = inet_ntoa (*(struct in_addr
//-- ends here