<div class="content" name="NetrMessageNameGetInfo" uuid="e5845829-414e-43c3-a956-e9e8dd4f6fd3"><p>The NetrMessageNameGetInfo (Opnum 2) interface is used to
retrieve information from the <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_18623b87-0e55-44bc-a5d3-d49388e1716a" data-linktype="relative-path">message
server</a> on a <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_0334e0bd-2755-42f6-aeff-2d4a22bf4abf" data-linktype="relative-path">NetBIOS name</a>
for which the message server is currently listening for messages.</p><dl>
<dd>
<div><pre> NET_API_STATUS NET_API_FUNCTION NetrMessageNameGetInfo(
   [in, string, unique] MSGSVC_HANDLE ServerName,
   [in, string] wchar_t* MsgName,
   [in] DWORD Level,
   [out, switch_is(Level)] LPMSG_INFO InfoStruct
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>A pointer to a null-terminated
string that MUST denote the NetBIOS name (as specified in <a href="https://go.microsoft.com/fwlink/?LinkId=90260" data-linktype="external">[RFC1001]</a> section 5.2)
or the <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_1769aec9-237e-44ed-9014-1abb3ec6de6e" data-linktype="relative-path">fully qualified
domain name (FQDN)</a> of the remote computer on which the function is to
execute. There are no other constraints on the format of this string. The
message server MUST ignore this parameter.</p><p><b>MsgName: </b> A null-terminated <a href="1bb1da94-fc7e-484c-ad2a-4e0d257a50ce#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8" data-linktype="relative-path">Unicode</a> UTF-16 string. It
MUST denote the recipient name for which to get information. The name is not
guaranteed to exist.</p><p><b>Level: </b> A 32-bit number that MUST be either 0
or 1. It represents the type of structure contained in the InfoStruct <a href="f277139c-37d6-4212-a7f3-01a0b9e79473" data-linktype="relative-path">MSG_INFO</a> structure. If
Level is 0, InfoStruct MUST contain an <a href="d36eac79-394c-4a08-8480-a98964ad5df3" data-linktype="relative-path">MSG_INFO_0</a> data structure.
If Level is 1, InfoStruct MUST contain an <a href="8b5122d3-a9c3-46fb-a049-f92570eaf85e" data-linktype="relative-path">MSG_INFO_1</a> data structure.</p><p><b>InfoStruct: </b> A pointer to a structure of type
MSG_INFO.</p><p><b>Return Values: </b>A <a href="../ms-dtyp/19cdb498-c67b-42b7-a540-4bc6a73c04f6" data-linktype="relative-path">NET_API_STATUS</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 NERR_Success</td>
  <td>The operation completed successfully.</td>
 </tr><tr>
  <td>0x00000005 ERROR_ACCESS_DENIED</td>
  <td>Access is denied.</td>
 </tr><tr>
  <td>0x00000008 ERROR_NOT_ENOUGH_MEMORY</td>
  <td>Not enough storage is available to process this command.</td>
 </tr><tr>
  <td>0x0000007B ERROR_INVALID_NAME</td>
  <td>The file name, directory name, or volume label syntax is incorrect.</td>
 </tr><tr>
  <td>0x0000007C ERROR_INVALID_LEVEL</td>
  <td>The system call level is not correct.</td>
 </tr><tr>
  <td>0x000008ED NERR_NotLocalName</td>
  <td>The name is not on the local computer.</td>
 </tr></tbody></table><p> </p></div>