gethostbyname failed

gethostbyname is failing and returning NULL on Windows 7. Should i use inet_addr or there is other way to get it

If you get into cmd.exe can nslookup return the value?

What I'm asking is: does the windows box dns server resolve the hostname? - so windows can get it.

it failed with localhost name itself. Windows 7

I don't know Windows 7 - other than that some coworkers installed it and broke software. How unusual.

I would say the hosts file is not there, and that you need to set up your network access.