3.1.4.2 NetrMessageNameEnum (Opnum 1)
The NetrMessageNameEnum (Opnum 1) interface is used to enumerate the NetBIOS names for which the message server is currently listening for messages.
NET_API_STATUS NET_API_FUNCTION NetrMessageNameEnum( [in, string, unique] MSGSVC_HANDLE ServerName, [in, out] LPMSG_ENUM_STRUCT InfoStruct, [in] DWORD PrefMaxLen, [out] LPDWORD TotalEntries, [in, out, unique] LPDWORD ResumeHandle );
-
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.
-
InfoStruct: A pointer to a buffer that receives a variable-length data structure of type MSG_ENUM_STRUCT. The buffer MUST be allocated, and the pointer MUST be assigned by the message server. On return, the structure MUST contain the list of names for which the message server is listening for messages.
-
PrefMaxLen: A 32-bit number that MUST denote the maximum number of bytes the message server should allocate for the buffer. If PrefMaxLen is set to 0xFFFFFFFF, the message server MUST always allocate a buffer that can hold all of the information available in a single MSG_ENUM_STRUCT.
-
TotalEntries: A pointer to a 32-bit number that, on return, MUST contain the total number of entries in InfoStruct.
-
ResumeHandle: A pointer to a 32-bit number that MUST contain the ordinal value of the name, in the message server's internal list, on which to start enumeration. This MAY be null.
-
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_SuccessThe operation completed successfully.
0x00000005
ERROR_ACCESS_DENIEDAccess is denied.
0x00000057
ERROR_INVALID_PARAMETERThe parameter is incorrect.
0x0000007C
ERROR_INVALID_LEVELThe system call level is not correct.
0x0000084B
NERR_BufTooSmallThe API return buffer is too small.