<div class="content"><p> </p><p>The <b>NetrWkstaGetInfo</b> method returns details about the
configuration of a remote computer, including the <span><a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_9a7bc8b3-3374-4608-8f73-be20a90b898b" data-linktype="relative-path">computer name</a></span> 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 <span><a href="9ef94a11-0e5c-49d7-9ac7-68d6f03565de" data-linktype="relative-path">2.2.2.1</a></span>) that
identifies the <span><a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server (2)</a></span>. The <span><a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a></span>
MUST map this structure to an <span><a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> binding <span><a href="3acf0e02-9bbd-4ce0-a7a0-586bc72d3ef4#gt_5044babb-08e3-4bb9-bc12-fe8f542b05ee" data-linktype="relative-path">handle</a></span>
(<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). 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>
  <p>0x00000064</p>
  </td>
  <td>
  <p>Details are returned in a <b>WKSTA_INFO_100</b>
  structure (section <span><a href="23275f4a-4e51-49d6-bdb5-f58519a3ea8a" data-linktype="relative-path">2.2.5.1</a></span>).</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000065</p>
  </td>
  <td>
  <p>Details are returned in a <b>WKSTA_INFO_101</b>
  structure (section <span><a href="98876691-3684-4b0c-bb43-3a8ac4705149" data-linktype="relative-path">2.2.5.2</a></span>).</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000066</p>
  </td>
  <td>
  <p>Details are returned in a <b>WKSTA_INFO_102</b>
  structure (section <span><a href="49c75566-2d4f-481a-bf32-7eb5627cb4ea" data-linktype="relative-path">2.2.5.3</a></span>).</p>
  </td>
 </tr><tr>
  <td>
  <p>0x000001F6</p>
  </td>
  <td>
  <p>Details are returned in a <b>WKSTA_INFO_502</b>
  structure (section <span><a href="eea7a04b-5817-4d3b-8ec0-26967b41cb04" data-linktype="relative-path">2.2.5.4</a></span>).</p>
  </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 (<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>).</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value/code</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>NERR_Success</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>The operation completed successfully.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_ACCESS_DENIED</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>The caller does not have the permissions to perform
  the operation.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_INVALID_LEVEL</p>
  <p>0x0000007C</p>
  </td>
  <td>
  <p>The information level is invalid.</p>
  </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 <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/0e5b0e1c-0ba5-4342-bc36-30c66a9d07fd" data-linktype="relative-path">3.3.3.1.3</a></span>.</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 <span><a href="2ab0c167-091a-46f3-be7d-826b27561bc7" data-linktype="relative-path">2.2.4.1</a></span>) 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
<span><a href="e0b508bc-764d-48b7-b44b-4f93c3d5cf8c" data-linktype="relative-path">3.2.1.5</a></span>)</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 <span><a href="602cbe68-7355-4d27-a2c9-f000bdee159c" data-linktype="relative-path">3.2.1</a></span>)</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>