Differential behaviour of GetHostbyName( ) API on NT and 2000

R

Ritesh Anand

I have been using getHostbyName() API to retrieve the IP
Address of a machine by passing the machine's name. But I
have noticed that in Windows NT when the network wire is
unplugged, this API returns the correct IP Address (say :
172.16.4.186) of the machine but in case of Win 2000
machine this API returns IP Addresss 127.0.0.1 instead of
172.16.4.186. Is there any way out of this ie can I get
the same behaviour in 2000 as I get in NT
 
D

Danny Slye - [MSFT}

Just an educated guess, it may be tied to Media Sense which did not exist
in NT4.
Q239924 How to Disable Media Sense for TCP/IP in Windows
http://support.microsoft.com/?id=239924

--------------------

I have been using getHostbyName() API to retrieve the IP
Address of a machine by passing the machine's name. But I
have noticed that in Windows NT when the network wire is
unplugged, this API returns the correct IP Address (say :
172.16.4.186) of the machine but in case of Win 2000
machine this API returns IP Addresss 127.0.0.1 instead of
172.16.4.186. Is there any way out of this ie can I get
the same behaviour in 2000 as I get in NT

__
Danny Slye
Microsoft Support Professional
MCSE

This posting is provided "AS IS" with no warranties and confers no rights.
Please reply to the newsgroup so that others may benefit. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top