Microsoft KB Archive/221935

From BetaArchive Wiki

Article ID: 221935

Article Last Modified on 2/27/2007


  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server

This article was previously published under Q221935


The Messenger service has undergone several changes in Windows 2000 Server with the Terminal Services component. This article describes the Messenger service and the modifications made to enable multi-user support.


The Alias database on a Terminal Server

In Windows 2000 Terminal Server, the Messenger service handles a list of aliases for each session instead of keeping a global list of aliases as in Microsoft Windows NT. The computer name is valid for every session.

When a name is added to the alias database by using the NET NAME command or by calling "NetMessageNameAdd," the name is added to the list of the session from which the command is executed. If this is the first session that adds this alias, it is also added at the NetBIOS level.

When the list of names is retrieved from the alias database, only the list of aliases that are valid for that session are returned. This includes the computer name. The list of names can be retrieved using the NET NAME command or by calling "NetMessageNetEnum."

When a name is deleted using the NET NAME command or by calling "NetMessageNameDel," the name is removed from the list of that session. If this name is known only in this session, it is also deleted at the NetBIOS level.

How Messages are Received, Handled, and Displayed

The Messenger service receives all of the NetBIOS messages whose recipient belongs to the alias database. The messages are queued and then displayed by a special thread of the Messenger service. This thread sends the message only to the sessions whose alias list contains the message recipient's name.

When the message arrives in a session it is handled not by using the Win32 MessageBox API, but by using the general "HardErrorHandler," which is a system thread also used in Windows to display certain system messages. When a message recipient's name belongs to several alias lists for different sessions, the message is dispatched to all relevant sessions. Likewise, when a message is sent to the computer name, it is dispatched to all sessions.

Known Issues

Limited Number of Names

The maximum number of aliases is 16 in Windows NT. This number is increased to approximately 253 in Windows 2000 Terminal Server. When the limit is reached, it is possible that messages are no longer sent from any session.

Lost Messages

If the desktop is not active when the message arrives, the message is lost. For example, this can occur if a screen saver is running or if the session is locked,

Sender's Name

On every message, the sender's name is the computer name. When a message is sent from a session, it might be desirable to have the user name listed as the sender's name. However, when a message is sent by a system component such as the Spooler service, the computer name might be desirable. This is not actually a Messenger service issue, as the sending of the message is actually performed by the Workstation service.

Keywords: kbinfo KB221935