Platform SDK: Network Management |
The NetMessageNameAdd function registers a message alias in the message name table. The function requires that the messenger service be started.
Only members of the Administrators local group can successfully execute the NetMessageNameAdd function on a remote server.
NET_API_STATUS NetMessageNameAdd( LPCWSTR servername, LPCWSTR msgname );
If the function succeeds, the return value is NERR_Success.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_INVALID_PARAMETER | The specified parameter is invalid. |
NERR_AlreadyExists | The message alias already exists on this computer. For more information, see the following Remarks section. |
NERR_DuplicateName | The name specified is already in use as a message alias on the network. |
NERR_NetworkError | A general failure occurred in the network hardware. |
NERR_TooManyNames | The maximum number of message aliases has been exceeded. |
The forward action flag is no longer a parameter to the LAN Manager 2.x NetMessageNameAdd function because message forwarding is no longer supported. If the NetMessageNameAdd function detects that a forwarded version of msgname exists on the network, the function will fail with error NERR_Already_Exists.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Unsupported.
Header: Declared in Lmmsg.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Message Functions, NetMessageNameDel