<div class="content"><p> </p><p>The NetrServerGetInfo method retrieves current configuration
information for CIFS and SMB Version 1.0 servers.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrServerGetInfo(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in] DWORD Level,
   [out, switch_is(Level)] LPSERVER_INFO InfoStruct
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>An <span><a href="5f8329ee-1965-4ea1-ad35-3b29fbb63232" data-linktype="relative-path">SRVSVC_HANDLE (section 2.2.1.1)</a></span>
pointer that identifies the <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a></span>. The <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a></span>
MUST map this structure to an RPC binding handle (see <span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span> sections
4.3.5 and 5.1.5.2).</p><p><b>Level: </b>Specifies the information level of the
data. The value of the <i>Level</i> parameter determines the contents of the <i>InfoStruct</i>
parameter. This parameter MUST be one of the following values.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>100</p>
  </td>
  <td>
  <p><span><a href="098f8f1a-56b3-4fd9-a7a6-4470c2945f0c" data-linktype="relative-path">LPSERVER_INFO_100</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>101</p>
  </td>
  <td>
  <p><span><a href="fcccf874-58c1-4fe5-a492-97d910518447" data-linktype="relative-path">LPSERVER_INFO_101</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>102</p>
  </td>
  <td>
  <p><span><a href="b503efd7-5ec4-48f8-b8d9-e61ca2724eff" data-linktype="relative-path">LPSERVER_INFO_102</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>103</p>
  </td>
  <td>
  <p><span><a href="a8909a6f-0cef-46d1-a85b-f990cd05a739" data-linktype="relative-path">LPSERVER_INFO_103</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>502</p>
  </td>
  <td>
  <p><span><a href="c4e38a94-4c15-4f55-82a6-79a374d1b409" data-linktype="relative-path">LPSERVER_INFO_502</a></span></p>
  </td>
 </tr><tr>
  <td>
  <p>503</p>
  </td>
  <td>
  <p><span><a href="57ab77c4-27b1-4964-ba3a-7a1f5b1bf06d" data-linktype="relative-path">LPSERVER_INFO_503</a></span></p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>InfoStruct: </b>This is a structure of type <span><a href="76d445e9-928d-437d-860d-de5961316a4c" data-linktype="relative-path">LPSERVER_INFO</a></span>,
as specified in section 2.2.3.7. The content of the <i>InfoStruct</i> parameter
is determined by the <i>Level</i> parameter, as the preceding table shows.</p><p><b>Return Values: </b>The method returns 0x00000000
(NERR_Success) to indicate success; otherwise, it returns a nonzero error code.
The method can take any specific error code value, as specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a></span>.
The most common error codes are listed in the following table.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>NERR_Success</p>
  </td>
  <td>
  <p>The client request succeeded.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000005</p>
  <p>ERROR_ACCESS_DENIED</p>
  </td>
  <td>
  <p>Access is denied.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x0000007C</p>
  <p>ERROR_INVALID_LEVEL</p>
  </td>
  <td>
  <p>The system call level is not correct.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>The client request failed because the specified
  parameter is invalid.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>Not enough storage is available to process this
  command.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>In response to the NetrServerGetInfo request, the server
MUST return configuration information from the <span><a href="53d4f103-312e-4843-8947-168ba54f4a6e" data-linktype="relative-path">ServerConfiguration</a></span>
object based on the value of the <i>Level</i> parameter.</p><p>The value of the <i>Level</i> parameter can be 100, 101,
102, 502, or 503. If the <i>Level</i> parameter has any other value, the server
MUST fail the call with an ERROR_INVALID_LEVEL error code.<a id="Appendix_A_Target_77"></a><a aria-label="Product behavior note 77" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_77" data-linktype="relative-path">&lt;77&gt;</a></p><p>The value of the <i>Level</i> parameter determines the
format of the <i>InfoStruct</i> parameter.</p><p>If the value of the <i>Level</i> parameter is 100, the
server MUST return its information by filling the SERVER_INFO_100 structure in
the <b>ServerInfo100</b> member of the <i>InfoStruct</i> parameter.</p><ul><li><p><span><span> 
</span></span>sv100_platform_id MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_platform_id</b>.</p>
</li><li><p><span><span> 
</span></span>If the <i>ServerName</i> parameter is NULL, sv100_name MUST be
set to <b>ServerConfiguration.ServerInfo103.sv103_name</b>. Otherwise,
sv100_name MUST be set to the value <i>of ServerName</i>.</p>
</li></ul><p>If the value of the <i>Level</i> parameter is 101, the
server MUST return its information by filling the SERVER_INFO_101 structure in
the <b>ServerInfo101</b> member of the <i>InfoStruct</i> parameter.</p><ul><li><p><span><span> 
</span></span>sv101_platform_id MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_platform_id</b>.</p>
</li><li><p><span><span> 
</span></span>If the <i>ServerName</i> parameter is NULL, <b>sv101_name</b>
MUST be set to ServerConfiguration.ServerInfo103.sv103_name. Otherwise, <b>sv101_name</b>
MUST be set to the value of <i>ServerName</i>.</p>
</li><li><p><span><span> 
</span></span><b>sv101_sv101_version_major</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_version_major</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv101_version_minor</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_version_minor</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv101_type</b> MUST be set to <b>GlobalServerAnnounce</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv101_comment</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_comment</b>.</p>
</li></ul><p>If the value of the <i>Level</i> parameter is 102, the
server MUST return its information by filling the SERVER_INFO_102 structure in
the ServerInfo102 member of the <i>InfoStruct</i> parameter.</p><ul><li><p><span><span> 
</span></span><b>sv102_platform_id</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_platform_id</b>.</p>
</li><li><p><span><span> 
</span></span>If the <i>ServerName</i> parameter is NULL, sv102_name MUST be
set to <b>ServerConfiguration.ServerInfo103.sv103_name</b>. Otherwise,  <b>sv102_name</b>
MUST be set to the value of <i>ServerName</i>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_ version_major</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_version_major</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_version_minor</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_version_minor</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_type</b> MUST be set to <b>GlobalServerAnnounce</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_comment</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_comment</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_users</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_users</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_disc</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_disc</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_hidden</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_hidden</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_anndelta</b> MUST be set to <b>ServerConfiguration.ServerInfo103.sv103_anndelta</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv102_licenses</b> MUST be set to 0.</p>
</li></ul><p>If the value of the <i>Level</i> parameter is 103, the
server MUST return server information in <b>ServerConfiguration.ServerInfo103</b>
directly by filling the SERVER_INFO_103 structure in the <i>ServerInfo103</i>
member of the <i>InfoStruct</i> parameter and setting sv103_type to <b>GlobalServerAnnounce</b>.<a id="Appendix_A_Target_78"></a><a aria-label="Product behavior note 78" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_78" data-linktype="relative-path">&lt;78&gt;</a></p><p>If the value of the <i>Level</i> parameter is 502, the
server MUST return its information by filling the SERVER_INFO_502 structure in
the ServerInfo502 member of the <i>InfoStruct</i> parameter.</p><ul><li><p><span><span> 
</span></span><b>sv502_sessopens</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessopens</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_sessvcs</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessvcs</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_opensearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_opensearch</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_sizreqbuf</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sizreqbuf</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_initworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_initworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_maxworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_rawworkitems</b> MUST be set to
ServerConfiguration.ServerInfo599.sv599_rawworkitems.</p>
</li><li><p><span><span> 
</span></span><b>sv502_irpstacksize</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_irpstacksize</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_maxrawbuflen</b> MUST be set to
ServerConfiguration.ServerInfo599.sv599_maxrawbuflen.</p>
</li><li><p><span><span> 
</span></span><b>sv502_sessusers</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessusers</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_sessconns</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessconns</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_maxpagedmemoryusage</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxpagedmemoryusage</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_maxnonpagedmemoryusage</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxnonpagedmemoryusage</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_enablesoftcompat</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enablesoftcompat</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_enableforcedlogoff</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enableforcedlogoff</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_timesource</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_timesource</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_acceptdownlevelapis</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_acceptdownlevelapis</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv502_lmannounce</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_
lmannounce</b>.</p>
</li></ul><p>If the value of the <i>Level</i> parameter is 503, the
server MUST return its information by filling the SERVER_INFO_503 structure in
the ServerInfo503 member of the <i>InfoStruct</i> parameter.</p><ul><li><p><span><span> 
</span></span><b>sv503_sessopens</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessopens</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_sessvcs</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessvcs</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_opensearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_opensearch</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_sizreqbuf</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sizreqbuf</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_initworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_initworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_rawworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_rawworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_irpstacksize</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_irpstacksize</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxrawbuflen</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxrawbuflen</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_sessusers</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessusers</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_sessconns</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_sessconns</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxpagedmemoryusage</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxpagedmemoryusage</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxnonpagedmemoryusage</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxnonpagedmemoryusage</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enablesoftcompat</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enablesoftcompat</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enableforcedlogoff</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enableforcedlogoff</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_timesource</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_timesource</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_acceptdownlevelapis</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_acceptdownlevelapis</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_lmannounce</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_lmannounce</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_domain</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_domain</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxcopyreadlen</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxcopyreadlen</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxcopywritelen</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxcopywritelen</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_minkeepsearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_minkeepsearch</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxkeepsearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxkeepsearch</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_minkeepcomplsearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_minkeepcomplsearch</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxkeepcomplsearch</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxkeepcomplsearch.</b></p>
</li><li><p><span><span> 
</span></span><b>sv503_threadcountadd</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_threadcountadd</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_numblockthreads</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_numblockthreads</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_scavtimeout</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_scavtimeout</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_minrcvqueue</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_minrcvqueue</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_minfreeworkitems</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_minfreeworkitems</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_xactmemsize</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_xactmemsize</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_threadpriority</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_threadpriority</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxmpxct</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxmpxct</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_oplockbreakwait</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_oplockbreakwait.</b></p>
</li><li><p><span><span> 
</span></span><b>sv503_oplockbreakresponsewait</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_oplockbreakresponsewait</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enableoplocks</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enableoplocks</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enableoplockforceclose</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enableoplockforceclose</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enablefcbopens</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enablefcbopens.</b></p>
</li><li><p><span><span> 
</span></span><b>sv503_enableraw</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enableraw</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_enablesharednetdrives</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_enablesharednetdrives</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_minfreeconnections</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_minfreeconnections</b>.</p>
</li><li><p><span><span> 
</span></span><b>sv503_maxfreeconnections</b> MUST be set to <b>ServerConfiguration.ServerInfo599.sv599_maxfreeconnections</b>.</p>
</li></ul><p>The server SHOULD<a id="Appendix_A_Target_79"></a><a aria-label="Product behavior note 79" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_79" data-linktype="relative-path">&lt;79&gt;</a> enforce
security measures to verify that the caller has the required permissions to
execute this routine. If the caller does not have the required credentials, the
server SHOULD<a id="Appendix_A_Target_80"></a><a aria-label="Product behavior note 80" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_80" data-linktype="relative-path">&lt;80&gt;</a> fail the call.</p><p>The <i>ServerName</i> parameter MUST be either NULL or a
null-terminated string, as described in section 2.2.1.1. If it is non-NULL, the
length of the string MUST be less than 1,024 or the server MUST fail the call
with ERROR_INVALID_PARAMETER.</p></div>