NetMessageNameAdd function (lmmsg.h)
[This function is not supported as of Windows Vista because the messenger service is not supported.]
The NetMessageNameAdd function registers a message alias in the message name table. The function requires that the messenger service be started.
Syntax
NET_API_STATUS NET_API_FUNCTION NetMessageNameAdd(
[in] LPCWSTR servername,
[in] LPCWSTR msgname
);
Parameters
[in] servername
Pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
[in] msgname
Pointer to a constant string that specifies the message alias to add. The string cannot be more than 15 characters long.
Return value
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.
Return code | Description |
---|---|
|
The caller does not have the appropriate access to complete the operation. |
|
A parameter is incorrect. |
|
This request is not supported. This error is returned on Windows Vista and later. |
|
The message alias already exists on this computer. For more information, see the following Remarks section. |
|
The name specified is already in use as a message alias on the network. |
|
A general failure occurred in the network hardware. |
|
The maximum number of message aliases has been exceeded. |
Remarks
Only members of the Administrators local group can successfully execute the NetMessageNameAdd function on a remote server.
The forward action flag is no longer a parameter to the LAN Manager 2.xNetMessageNameAdd 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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | lmmsg.h (include Lm.h) |
Library | Netapi32.lib |
DLL | Netapi32.dll |