<div class="content" name="NetrSendMessage" uuid="28c19c6e-ecfc-4fed-834a-6b9c0400a373"><p>The NetrSendMessage (Opnum 0) method is used to send a text
message to a <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_18623b87-0e55-44bc-a5d3-d49388e1716a" data-linktype="relative-path">message server</a>.</p><dl>
<dd>
<div><pre> error_status_t NetrSendMessage(
   [in] handle_t hRpcBinding,
   [in, string] LPSTR From,
   [in, string] LPSTR To,
   [in, string] LPSTR Text
 );
</pre></div>
</dd></dl><p><b>hRpcBinding: </b> An <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> primitive binding
handle, which MUST be as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a> section 4 and
[C706] section 5.<a id="Appendix_A_Target_21"></a><a aria-label="Product behavior note 21" href="e890fd2e-92d5-4468-a6cf-db6977866112#Appendix_A_21" data-linktype="relative-path">&lt;21&gt;</a></p><p><b>From: </b>A null-terminated string that MUST
denote the name of the sender of the message. The name is not guaranteed to be
unique or reachable by this method. The string MUST be expressed in the <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_3240e34e-920e-40ac-a672-342ac34a5e22" data-linktype="relative-path">original equipment manufacturer
(OEM) character set</a>, as specified in <a href="../ms-ucoderef/4a045e08-fc29-4f22-baf4-16f38c2825fb" data-linktype="relative-path">[MS-UCODEREF]</a>
section <a href="../ms-ucoderef/28fefe92-d66c-4b03-90a9-97b473223d43" data-linktype="relative-path">2.2.1</a>,
of the invoker of this method.</p><p><b>To: </b>A null-terminated string that MUST
represent the name of the intended recipient of the message. The name is not
guaranteed to be unique or reachable by this method. The string is expressed in
the OEM character set, as specified in [MS-UCODEREF] section 2.2.1, of the
invoker of this method.</p><p><b>Text: </b>A null-terminated string that MUST
contain the message that is being sent to the recipient in the <i>To</i>
parameter. The string is expressed in the OEM character set, as specified in
[MS-UCODEREF] section 2.2.1.</p><p><b>Return Values: </b>An <a href="../ms-dtyp/802ada7f-c5fc-415e-8438-c7369bb4193b" data-linktype="relative-path">error_status_t</a>
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 <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>)
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.</p><table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00000000 ERROR_SUCCESS</td>
  <td>The operation completed successfully.</td>
 </tr><tr>
  <td>0x00000005 ERROR_ACCESS_DENIED</td>
  <td>Access is denied.</td>
 </tr><tr>
  <td>0x00000032 ERROR_NOT_SUPPORTED</td>
  <td>The request is not supported.&lt;22&gt;</td>
 </tr><tr>
  <td>0x00000057 ERROR_INVALID_PARAMETER</td>
  <td>The parameter is incorrect.</td>
 </tr><tr>
  <td>0x00000858 NERR_NetworkError</td>
  <td>A general network error occurred.</td>
 </tr><tr>
  <td>0x000008E1 NERR_NameNotFound</td>
  <td>The message alias could not be found on the network.</td>
 </tr><tr>
  <td>0x000008E8 NERR_GrpMsgProcessor</td>
  <td>An error occurred in the domain message processor.</td>
 </tr><tr>
  <td>0x000008E9 NERR_PausedRemote</td>
  <td>The message was sent, but the recipient has paused the Messenger service.</td>
 </tr><tr>
  <td>0x000008EA NERR_BadReceive</td>
  <td>The message was sent but not received.</td>
 </tr><tr>
  <td>0x000008EB NERR_NameInUse</td>
  <td>The message alias is currently in use. Try again later.</td>
 </tr><tr>
  <td>0x000008ED NERR_NotLocalName</td>
  <td>The name is not on the local computer.</td>
 </tr><tr>
  <td>0x000008F1 NERR_TruncatedBroadcast</td>
  <td>The broadcast message was truncated.</td>
 </tr><tr>
  <td>0x000008F9 NERR_DuplicateName</td>
  <td>A duplicate message alias exists on the network.</td>
 </tr></tbody></table><p> </p></div>