[in] Pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
Windows NT: This string must begin with \\.
[in] Pointer to a constant string that specifies the message alias to which the message buffer should be sent.
[in] Pointer to a constant string specifying who the message is from. If this parameter is NULL, the message is sent from the local computer name.
[in] Pointer to a buffer that contains the message text. For more information, see Network Management Function Buffers.
[in] Specifies a value that contains the length, in bytes, of the message text pointed to by the buf parameter.
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.
Return Code Description
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.
If you call this function on a 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 Domain Admins and Account Operators to call this function. On a member server or workstation, only Administrators and Server Operators can call this function. For more information, see Security Requirements for the Network Management Functions. For more information on ACLs and ACEs, see Access Control Model.
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.
Client: Included in Windows XP, Windows 2000 Professional, and Windows NT Workstation.
Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server.
Header: Declared in Lmmsg.h; include Lm.h.
Library: Use Netapi32.lib.