This article was previously published under Q183832
This article has been archived. It is offered "as is" and will no longer be updated.
When you use the gethostname function in Windows NT, it does not support the ability to use alternate computer names for the computer.
The gethostname function returns the node name instead of the cluster name in the network name resource.
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, click the following article number to view the article in theMicrosoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack
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.
The change that was made in GetComputerName to support alternate computernames has been added to gethostname. GetComputerName checks anenvironment variable. If that variable exists, GetComputerName returns itsvalue instead of the real computer name. The change was made to keepapplications from breaking in a cluster.