<div class="content" name="RpcWinStationBreakPoint" uuid="5b55d7a0-32c5-494b-a1a9-1d25d283c542"><p>The RpcWinStationBreakPoint method breaks into the debugger
in either the session process of a specific session or in the <span><a href="c41d3367-04c9-4c93-babf-9b5de834eb29#gt_b416f72e-cf04-4d80-bf93-f5753f3b0998" data-linktype="relative-path">terminal
server</a></span> service process. When this method is called, the server
impersonates the caller and then tries to enable SeShutdownPrivilege (see <span><a href="https://go.microsoft.com/fwlink/?LinkId=212627" data-linktype="external">[MSDN-PRVLGECNSTS]</a></span>).
If the attempt to enable this privilege fails, the RpcWinStationBreakPoint call
fails.<a id="Appendix_A_Target_187"></a><a aria-label="Product behavior note 187" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_187" data-linktype="relative-path">&lt;187&gt;</a></p><dl>
<dd>
<div><pre> BOOLEAN RpcWinStationBreakPoint(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in] DWORD LogonId,
   [in] BOOLEAN KernelFlag
 );
</pre></div>
</dd></dl><p><b>hServer: </b>Handle to the server object. This is
of type <span><a href="49484cdf-2feb-4de9-a588-5d01cf8995dc" data-linktype="relative-path">SERVER_HANDLE</a></span>. The <i>hServer</i>
argument MUST be obtained from a previous call to <span><a href="fd6f339d-f5dd-452c-a9a9-ec753c22a36a" data-linktype="relative-path">RpcWinStationOpenServer</a></span>.</p><p><b>pResult: </b> Failure error code if the call to
RpcWinStationBreakPoint failed. If the call was successful, this parameter MUST
be STATUS_SUCCESS (0x00000000).</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>STATUS_SUCCESS 0x00000000</td>
  <td>The call succeeded.</td>
 </tr><tr>
  <td>STATUS_ACCESS_DENIED 0xC0000022</td>
  <td>The SeShutdownPrivilege (see [MSDN-PRVLGECNSTS]) privilege cannot be enabled.</td>
 </tr></tbody></table>
</dd></dl><p><b>LogonId: </b> The ID of the session to break into
the debugger. If this parameter is -2, the terminal server service MUST break
into the debugger instead.<a id="Appendix_A_Target_188"></a><a aria-label="Product behavior note 188" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_188" data-linktype="relative-path">&lt;188&gt;</a></p><p><b>KernelFlag: </b> Set to TRUE to indicate that the
server will break into the debugger in a particular session in kernel mode. If <i>LogonId</i>
is -2, the server MUST break into the debugger in user mode.</p><p><b>Return Values: </b> Returns TRUE if the call
succeeded, or FALSE if the method failed. On failure, <i>pResult</i> indicates
the failure status code.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x01 TRUE</td>
  <td>Successful completion.</td>
 </tr><tr>
  <td>0x00 FALSE</td>
  <td>Method call failed.</td>
 </tr></tbody></table>
</dd></dl><p> </p></div>