GetHostName() Must Support Alternate Computer Names

ID: Q183832


The information in this article applies to:


SYMPTOMS

When you use the GetHostName() function in Windows NT, it does not support the ability to use alternate computer names for the computer.


CAUSE

The GetHostName() function returns the node name instead of the cluster name in the network name resource.


RESOLUTION

To resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, please see the following article in the Microsoft Knowledge Base:

Q152734 How to Obtain the Latest Windows NT 4.0 Service Pack


STATUS

Microsoft has confirmed this to be a problem in Windows NT Server, Enterprise Edition version 4.0. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.


MORE INFORMATION

The change that was made in GetComputerName() to support alternate computer names has been added to GetHostName(). GetComputerName checks an environment variable. If that variable exists, GetComputerName returns its value instead of the real computer name. The change was made to keep applications from breaking in a cluster.

Additional query words: mscs


Keywords          : NT4SP4Fix kbbug4.00 kbfix4.00.sp4 NTSrv 
Version           : WinNT:4.0
Platform          : winnt 
Issue type        : kbbug 

Last Reviewed: April 10, 1999