Differential behaviour of GetHostbyName( ) API on NT and 2000

  • Thread starter Thread starter Ritesh Anand
  • Start date Start date
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
 
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!
 
Back
Top