PC Review


Reply
Thread Tools Rate Thread

Differential behaviour of GetHostbyName( ) API on NT and 2000

 
 
Ritesh Anand
Guest
Posts: n/a
 
      13th Feb 2004
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


 
Reply With Quote
 
 
 
 
Danny Slye - [MSFT}
Guest
Posts: n/a
 
      13th Feb 2004
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!

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gethostbyname rpv30@yahoo.co.in Microsoft Windows 2000 Active Directory 3 8th Aug 2006 02:41 PM
gethostbyname rpv30@yahoo.co.in Windows XP Networking 1 8th Aug 2006 06:20 AM
gethostbyname Jason Microsoft VB .NET 1 13th Feb 2006 10:29 PM
GetHostByName in IIS Bill Microsoft ASP .NET 0 2nd Aug 2004 05:48 PM
Different behaviour of getHostbyName() API in NT and 2K Ritesh Anand Microsoft Windows 2000 Developer 0 13th Feb 2004 08:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 PM.