3.1.4.1 NetrMessageNameAdd (Opnum 0)

The NetrMessageNameAdd (Opnum 0) interface is used to configure the message server to listen for messages sent to an additional NetBIOS name.

 NET_API_STATUS NET_API_FUNCTION NetrMessageNameAdd(
   [in, string, unique] MSGSVC_HANDLE ServerName,
   [in, string] wchar_t* MsgName
 );

ServerName: A pointer to a null-terminated string that MUST denote the NetBIOS name (as specified in [RFC1001] section 5.2) or the fully qualified domain name (FQDN) of the remote computer on which the function is to execute. There are no other constraints on the format of this string. The message server MUST ignore this parameter.

MsgName: A null-terminated Unicode string that MUST denote the recipient name to add. The name is not guaranteed to be unique or reachable by this method. The string MUST be represented using Unicode UTF-16.

Return Values: A NET_API_STATUS value that indicates return status. If the method returns a negative value, the method has failed. If the 12-bit facility code (bits 16–27) is set to 0x007, the value contains a Win32 error code (defined in [MS-ERREF]) in the lower 16 bits. Zero or positive values indicate success, with the lower 16 bits in positive nonzero values containing warnings or flags defined in the method implementation.

Return value/code

Description

0x00000000

ERROR_SUCCESS

The operation completed successfully.

0x00000005

ERROR_ACCESS_DENIED

Access is denied.

0x0000007B

ERROR_INVALID_NAME

The file name, directory name, or volume label syntax is incorrect.

0x00000859

NERR_NetworkError

A general network error occurred.

0x0000085C

NERR_InternalError

An internal error occurred.

0x000008E4

NERR_AlreadyExists

This message alias already exists locally.

0x000008E5

NERR_TooManyNames

The maximum number of added message aliases has been exceeded.

0x000008F9

NERR_DuplicateName

The name specified is already in use as a message alias on the network.