<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/650a105f-6443-4eb0-839a-188708328fb0" data-linktype="external">msdn link</a></p><p>The <b>NetrLogonControl2</b> method<a id="Appendix_A_Target_259"></a><a aria-label="Product behavior note 259" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_259" data-linktype="relative-path">&lt;259&gt;</a> is a predecessor to the <a href="df7e5dd1-ebcc-4754-9da0-2e0bded82d29" data-linktype="relative-path">NetrLogonControl2Ex</a> method
(section 3.5.4.9.1) and is updated to have the same functionality as
NetrLogonControl2Ex. All parameters of this method have the same meanings as
the identically named parameters of the NetrLogonControl2Ex method. </p><dl>
<dd>
<div><pre> NET_API_STATUS NetrLogonControl2(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [in] DWORD FunctionCode,
   [in] DWORD QueryLevel,
   [in, switch_is(FunctionCode)] PNETLOGON_CONTROL_DATA_INFORMATION Data,
   [out, switch_is(QueryLevel)] PNETLOGON_CONTROL_QUERY_INFORMATION Buffer
 );
</pre></div>
</dd></dl><p>All restrictions on parameter values in the
NetrLoginControl2Ex method (section 3.5.4.9.1) apply. Extra restrictions are
applied to the values of the <i>QueryLevel</i> parameter as follows:</p><ul><li><p><span><span> 
</span></span>If the <i>QueryLevel</i> parameter is set to 0x00000004, the
error ERROR_INVALID_LEVEL is returned.</p>
</li></ul><p>Message processing is identical to NetrLogonControl2Ex
(section 3.5.4.9.1).</p></div>