Platform SDK: Network Management

NetMessageNameGetInfo

The NetMessageNameGetInfo function retrieves information about a particular message alias in the message name table. The function requires that the messenger service be started.

Security Requirements

Only members of the Administrators local group can successfully execute the NetMessageNameGetInfo function on a remote server.

NET_API_STATUS NetMessageNameGetInfo(
  LPCWSTR servername,  
  LPCWSTR msgname,     
  DWORD level,         
  LPBYTE *bufptr       
);

Parameters

servername
[in] Pointer to a constant Unicode string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
msgname
[in] Pointer to a constant Unicode string specifying the message alias for which to return information.
level
[in] Specifies the information level of the data. This parameter can be one of the following values.
Value Meaning
0 Return the message alias. The bufptr parameter points to a MSG_INFO_0 structure.
1 Return the message alias. The bufptr parameter points to a MSG_INFO_1 structure. This level exists only for compatibility. Message forwarding is not supported.

bufptr
[out] Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter. This buffer is allocated by the system and must be freed using the NetApiBufferFree function.

Return Values

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_NOT_ENOUGH_MEMORY Insufficient memory is available.
NERR_NotLocalName The message alias is not on the local computer.

Remarks

To list all the message aliases in a message name table, you can call the NetMessageNameEnum function.

Requirements

  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.

See Also

Network Management Overview, Network Management Functions, Message Functions, MSG_INFO_0, MSG_INFO_1, NetMessageNameEnum