Platform SDK: Network Management

NetMessageBufferSend

The NetMessageBufferSend function sends a buffer of information to a registered message alias.

Security Requirements

Windows NT: No special group membership is required to execute the NetMessageBufferSend function on a LAN Manager or a Windows NT system. Admin, Accounts, Print, or Server operator group membership is required to successfully execute NetMessageBufferSend on a remote server.

Windows 2000: If you call this function on a Windows 2000 domain controller that is running Active Directory, access is allowed or denied based on the access-control list (ACL) for the securable object. The default ACL permits only Administrators and account operators to call this function. On a member server or workstation, only Administrators and account operators can call this function. For more information, see Security Requirements for the Network Management Functions.

NET_API_STATUS NetMessageBufferSend(
  LPCWSTR servername,  
  LPCWSTR msgname,     
  LPCWSTR fromname,    
  LPBYTE buf,          
  DWORD buflen         
);

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 to which the message buffer should be sent.
fromname
[in] Pointer to a constant Unicode string specifying who the message is from. If this parameter is NULL, the message is sent from the local computer name.
buf
[in] Pointer to a buffer that contains the message text.
buflen
[in] Specifies a DWORD value that contains the length, in bytes, of the message text pointed to by the buf parameter.

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_PARAMETER The specified parameter is invalid.
ERROR_NOT_SUPPORTED This network request is not supported.
NERR_NameNotFound The user name could not be found.
NERR_NetworkError A general failure occurred in the network hardware.

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, NetMessageNameAdd, NetMessageNameDel, NetMessageNameEnum, NetMessageNameGetInfo