Platform SDK: Network Management |
The NetMessageNameEnum function lists the message aliases that receive messages on a specified computer. The function requires that the messenger service be started.
Only members of the Administrators local group can successfully execute the NetMessageNameEnum function on a remote server.
NET_API_STATUS NetMessageNameEnum( LPCWSTR servername, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle );
Value | Meaning |
---|---|
0 | Return message aliases. The bufptr parameter points to an array of MSG_INFO_0 structures. |
1 | Return message aliases. The bufptr parameter points to an array of MSG_INFO_1 structures. This level exists only for compatibility. Message forwarding is not supported. |
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_ACCESS_DENIED | The user does not have access to the requested information. |
ERROR_INVALID_LEVEL | The value specified for the level parameter is invalid. |
ERROR_MORE_DATA | More entries are available. Specify a large enough buffer to receive all entries. |
ERROR_NOT_ENOUGH_MEMORY | Insufficient memory is available. |
NERR_BufTooSmall | The supplied buffer is too small. |
To retrieve information about a particular message alias in the message name table, you can call the NetMessageNameGetInfo function.
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, MSG_INFO_0, MSG_INFO_1, NetMessageNameGetInfo