<div class="content" name="NetrWkstaGetInfo" uuid="4af41d6f-b800-4de1-af5b-0b15a85f8e04"><p>The <b>NetrWkstaGetInfo</b> method returns details about the
configuration of a remote computer, including the <a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_9a7bc8b3-3374-4608-8f73-be20a90b898b" data-linktype="relative-path">computer name</a> and major and
minor version numbers of the operating system.</p><dl>
<dd>
<div><pre> unsigned long NetrWkstaGetInfo(
   [in, string, unique] WKSSVC_IDENTIFY_HANDLE ServerName,
   [in] unsigned long Level,
   [out, switch_is(Level)] LPWKSTA_INFO WkstaInfo
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>A <b>WKSSVC_IDENTIFY_HANDLE</b>
structure (section <a href="9ef94a11-0e5c-49d7-9ac7-68d6f03565de" data-linktype="relative-path">2.2.2.1</a>)
that identifies the <a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server
(2)</a>. The <a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a> MUST
map this structure to an <a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a>
binding <a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_5044babb-08e3-4bb9-bc12-fe8f542b05ee" data-linktype="relative-path">handle</a> (<a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a> sections 4.3.5
and 5.1.5.2). The server MUST ignore this parameter.</p><p><b>Level: </b>The information level of the data. 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>0x00000064</td>
  <td>Details are returned in a WKSTA_INFO_100 structure (section 2.2.5.1).</td>
 </tr><tr>
  <td>0x00000065</td>
  <td>Details are returned in a WKSTA_INFO_101 structure (section 2.2.5.2).</td>
 </tr><tr>
  <td>0x00000066</td>
  <td>Details are returned in a WKSTA_INFO_102 structure (section 2.2.5.3).</td>
 </tr><tr>
  <td>0x000001F6</td>
  <td>Details are returned in a WKSTA_INFO_502 structure (section 2.2.5.4).</td>
 </tr></tbody></table>
</dd></dl><p><b>WkstaInfo: </b>A pointer to the buffer that
receives the data. The format of this data depends on the value of the <i>level</i>
parameter.</p><p><b>Return Values: </b>When the message processing
result meets the description in column two of the following table, this method
MUST return one of the following values (<a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a>).</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value/code</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>NERR_Success 0x00000000</td>
  <td>The operation completed successfully.</td>
 </tr><tr>
  <td>ERROR_ACCESS_DENIED 0x00000005</td>
  <td>The caller does not have the permissions to perform the operation.</td>
 </tr><tr>
  <td>ERROR_INVALID_LEVEL 0x0000007C</td>
  <td>The information level is invalid.</td>
 </tr></tbody></table>
</dd></dl><p>The response of the server depends on the value of the <i>Level</i>
parameter. If the <i>Level</i> parameter is not equal to one of the valid
values, the server MUST fail the call and return ERROR_INVALID_LEVEL.</p><p>The server SHOULD<a id="Appendix_A_Target_29"></a><a aria-label="Product behavior note 29" href="def80006-2495-4571-8a93-1668e0f8af31#Appendix_A_29" data-linktype="relative-path">&lt;29&gt;</a> enforce
security measures to verify that the caller has the required permissions to
execute this routine. If the server enforces security measures, and the caller
does not have the required credentials, the server MUST fail the call and
return ERROR_ACCESS_DENIED. Specifications for determining the identity of the
caller for the purpose of performing an access check are in <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>
section <a href="../ms-rpce/0e5b0e1c-0ba5-4342-bc36-30c66a9d07fd" data-linktype="relative-path">3.3.3.1.3</a>.</p><p>If the <i>Level</i> parameter equals 0x00000064, the server
MUST fill in the <b>WKSTA_INFO_100</b> structure <b>WkstaInfo100</b> member
(section <a href="2ab0c167-091a-46f3-be7d-826b27561bc7" data-linktype="relative-path">2.2.4.1</a>) of
the <i>WkstaInfo</i> parameter as follows:</p><ul><li><p><span><span> 
</span></span><b>wki100_computername</b> is set to <b>ComputerNameNetBIOS </b>(section
<a href="e0b508bc-764d-48b7-b44b-4f93c3d5cf8c" data-linktype="relative-path">3.2.1.5</a>)</p>
</li><li><p><span><span> 
</span></span><b>wki100_langroup</b> is set to <b>DomainNameFQDN </b>(section
3.2.1.5)</p>
</li><li><p><span><span> 
</span></span><b>wki100_platform_id</b> is set to <b>Platform_Id</b> (section <a href="602cbe68-7355-4d27-a2c9-f000bdee159c" data-linktype="relative-path">3.2.1</a>)</p>
</li><li><p><span><span> 
</span></span><b>wki100_ver_major</b> is set to <b>Ver_Major</b> (section
3.2.1)</p>
</li><li><p><span><span> 
</span></span><b>wki100_ver_minor</b> is set to <b>Ver_Minor</b> (section
3.2.1)</p>
</li></ul><p>If the <i>Level</i> parameter equals 0x00000065, the server
MUST fill in the <b>WKSTA_INFO_101</b> structure <b>WkstaInfo101</b> member
(section 2.2.4.1) of the <i>WkstaInfo</i> parameter as follows:</p><ul><li><p><span><span> 
</span></span><b>wki101_computername</b> is set to <b>ComputerNameNetBIOS</b></p>
</li><li><p><span><span> 
</span></span><b>wki101_langroup</b> is set to <b>DomainNameFQDN</b></p>
</li><li><p><span><span> 
</span></span><b>wki101_platform_id</b> is set to <b>Platform_Id</b></p>
</li><li><p><span><span> 
</span></span><b>wki101_ver_major</b> is set to <b>Ver_Major</b></p>
</li><li><p><span><span> 
</span></span><b>wki101_ver_minor</b> is set to <b>Ver_Minor</b></p>
</li><li><p><span><span> 
</span></span><b>wki101_lanroot</b> is set to NULL</p>
</li></ul><p>If the <i>Level</i> parameter equals 0x00000066, the server
MUST fill in the <b>WKSTA_INFO_102</b> structure <b>WkstaInfo102</b> member
(section 2.2.4.1) of the <i>WkstaInfo</i> parameter as follows:</p><ul><li><p><span><span> 
</span></span><b>wki102_computername</b> is set to <b>ComputerNameNetBIOS</b></p>
</li><li><p><span><span> 
</span></span><b>wki102_langroup</b> is set to <b>DomainNameFQDN</b></p>
</li><li><p><span><span> 
</span></span><b>wki102_platform_id</b> is set to <b>Platform_Id</b></p>
</li><li><p><span><span> 
</span></span><b>wki102_ver_major</b> is set to <b>Ver_Major</b></p>
</li><li><p><span><span> 
</span></span><b>wki102_ver_minor</b> is set to <b>Ver_Minor</b></p>
</li><li><p><span><span> 
</span></span><b>wki102_lanroot</b> is set to NULL</p>
</li><li><p><span><span> 
</span></span><b>wki102_logged_on_users</b> is set to the number of users who
are currently active on the computer</p>
</li></ul><p>If the <i>Level</i> parameter equals 0x000001F6, the server
MUST set values in the <b>WKSTA_INFO_502</b> structure <b>WkstaInfo502</b>
member (section 2.2.4.1) specified by the <i>WkstaInfo</i> parameter from
elements of the ADM (section 3.2.1) as follows:</p><ul><li><p><span><span> 
</span></span><b>wki502_keep_conn</b> is set to <b>Keep_Connection</b></p>
</li><li><p><span><span> 
</span></span><b>wki502_max_cmds</b> is set to <b>Max_Commands</b></p>
</li><li><p><span><span> 
</span></span><b>wki502_sess_timeout</b> is set to <b>Session_TimeOut</b></p>
</li><li><p><span><span> 
</span></span><b>wki502_dormant_file_limit</b> MAY<a id="Appendix_A_Target_30"></a><a aria-label="Product behavior note 30" href="def80006-2495-4571-8a93-1668e0f8af31#Appendix_A_30" data-linktype="relative-path">&lt;30&gt;</a> be set to
<b>DormantFileLimit</b></p>
</li></ul></div>