<div class="content" name="NetrLogonSetServiceBits" uuid="481bb1f8-319a-40fb-89cd-ad1f6a146d9d"><p>The <b>NetrLogonSetServiceBits</b> method SHOULD<a id="Appendix_A_Target_247"></a><a aria-label="Product behavior note 247" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_247" data-linktype="relative-path">&lt;247&gt;</a> be used to notify Netlogon
whether a <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_76a05049-3531-4abd-aec8-30e19954b4bd" data-linktype="relative-path">domain controller</a></span> is
running specified services, as detailed in the following section.</p><dl>
<dd>
<div><pre> NTSTATUS NetrLogonSetServiceBits(
   [in, unique, string] LOGONSRV_HANDLE ServerName,
   [in] DWORD ServiceBitsOfInterest,
   [in] DWORD ServiceBits
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>The custom binding handle, as
defined in section <span><a href="3b224201-b531-43e2-8c79-b61f6dea8640" data-linktype="relative-path">3.5.4.1</a></span>,
representing the connection to a DC.</p><p><b>ServiceBitsOfInterest: </b>A set of bit flags used
as a mask to indicate which service&#39;s state (running or not running) is being
set by this call. The value is constructed from zero or more bit flags from the
following table.</p><dl>
<dd>
<table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>C</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>B</td>
  <td>0</td>
  <td>0</td>
  <td>A</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
 </tr>
</tbody></table>
</dd>
<dd>
<p>The flags SHOULD<a id="Appendix_A_Target_248"></a><a aria-label="Product behavior note 248" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_248" data-linktype="relative-path">&lt;248&gt;</a> be
defined as follows.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>A</td>
  <td>The state of the time service is being set.</td>
 </tr><tr>
  <td>B</td>
  <td>The state of the time service with clock hardware is being set.</td>
 </tr><tr>
  <td>C</td>
  <td>The state of the Active Directory Web service is being set.</td>
 </tr></tbody></table>
</dd>
<dd>
<p>All other bits MUST be set to zero; otherwise, the
error STATUS_ACCESS_DENIED is returned.</p>
</dd></dl><p><b>ServiceBits: </b>A set of bit flags used as a mask
to indicate whether the service indicated by <i>ServiceBitsOfInterest</i> is
running. If the flag is set to 0, the corresponding service indicated by <i>ServiceBitsOfInterest</i>
is not running. Otherwise, if the flag is set to 1, the corresponding service
indicated by <i>ServiceBitsOfInterest</i> is running. The value is constructed
from zero or more bit flags from the following table.</p><dl>
<dd>
<table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>C</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>B</td>
  <td>0</td>
  <td>0</td>
  <td>A</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
 </tr>
</tbody></table>
</dd>
<dd>
<p>The flags SHOULD<a id="Appendix_A_Target_249"></a><a aria-label="Product behavior note 249" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_249" data-linktype="relative-path">&lt;249&gt;</a> be
defined as follows.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>A</td>
  <td>Time service is running.</td>
 </tr><tr>
  <td>B</td>
  <td>Time service with clock hardware is running.</td>
 </tr><tr>
  <td>C</td>
  <td>Active Directory Web service is running.</td>
 </tr></tbody></table>
</dd>
<dd>
<p>All other bits MUST be set to zero; otherwise, the
error STATUS_INVALID_PARAMETER is returned.</p>
</dd>
<dd>
<p>If a flag is set to 1 and the same flag is set to 0
in the <i>ServiceBitsOfInterest</i> parameter, the error
STATUS_INVALID_PARAMETER is returned.</p>
</dd></dl><p><b>Return Values: </b>The method returns 0x00000000
on success; otherwise, it returns a nonzero error code.</p><p>The server SHOULD<a id="Appendix_A_Target_250"></a><a aria-label="Product behavior note 250" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_250" data-linktype="relative-path">&lt;250&gt;</a> return ERROR_ACCESS_DENIED if
the caller is not local.</p><p>If the client does not have
sufficient privilege, the server MUST return ERROR_ACCESS_DENIED.</p><p>The server MUST return
STATUS_ACCESS_DENIED if bits other than those previously specified are passed
in.</p><p>For every service state being
set by this call, as indicated by <i>ServiceBitsOfInterest</i>, the state of
the corresponding service (<span><a href="../ms-adts/d2435927-0999-4c62-8c6d-13ba31a52e1a" data-linktype="relative-path">[MS-ADTS]</a></span>
section <span><a href="../ms-adts/f55d3f53-351d-4407-940e-f53eb6154af0" data-linktype="relative-path">6.3.1.2</a></span>),
as indicated by <i>ServiceBits</i>, is updated in the <b>ServerServiceBits</b>
ADM element.</p></div>