3.1.4.3 NetrMessageNameGetInfo (Opnum 2)

The NetrMessageNameGetInfo (Opnum 2) interface is used to retrieve information from the message server on a NetBIOS name for which the message server is currently listening for messages.

 NET_API_STATUS NET_API_FUNCTION NetrMessageNameGetInfo(
   [in, string, unique] MSGSVC_HANDLE ServerName,
   [in, string] wchar_t* MsgName,
   [in] DWORD Level,
   [out, switch_is(Level)] LPMSG_INFO InfoStruct
 );

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 UTF-16 string. It MUST denote the recipient name for which to get information. The name is not guaranteed to exist.

Level:  A 32-bit number that MUST be either 0 or 1. It represents the type of structure contained in the InfoStruct MSG_INFO structure. If Level is 0, InfoStruct MUST contain an MSG_INFO_0 data structure. If Level is 1, InfoStruct MUST contain an MSG_INFO_1 data structure.

InfoStruct:  A pointer to a structure of type MSG_INFO.

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

NERR_Success

The operation completed successfully.

0x00000005

ERROR_ACCESS_DENIED

Access is denied.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

Not enough storage is available to process this command.

0x0000007B

ERROR_INVALID_NAME

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

0x0000007C

ERROR_INVALID_LEVEL

The system call level is not correct.

0x000008ED

NERR_NotLocalName

The name is not on the local computer.