<div class="content" name="RpcWinStationShadowStop" uuid="23f97d49-8b34-4ee6-8af0-87114260e2bb"><p>The RpcWinStationShadowStop method stops all shadow
operations on the specified session, including whether the session is acting as
a shadow client (a session that is shadowing another session) or as a shadow
target (a session being shadowed by another session). If the method succeeds,
both the state of the session that started the shadow operation and the state
of the session being shadowed are State_Active as defined in the <b>WINSTATIONSTATECLASS</b>
enumeration (section <span><a href="b619d8aa-4e8a-4716-954e-a4d596ed37f8" data-linktype="relative-path">2.2.1.9</a></span>).</p><p>Caller MUST have WINSTATION_DISCONNECT and WINSTATION_RESET
permissions. For each aforementioned required permission, the method checks
whether the caller has the permission (section <span><a href="4507e852-be3d-45b6-bc47-8ca0b552c94d" data-linktype="relative-path">3.1.1</a></span>) by setting
the Access Request mask to the specific permission, and fails if the caller
does not have the permission.<a id="Appendix_A_Target_208"></a><a aria-label="Product behavior note 208" href="7ce7f717-461b-4f18-9829-6690168c7707#Appendix_A_208" data-linktype="relative-path">&lt;208&gt;</a></p><dl>
<dd>
<div><pre> BOOLEAN RpcWinStationShadowStop(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in] DWORD LogonId,
   [in] BOOLEAN bWait
 );
</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
hServer 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
RpcWinStationShadowStop 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 was successful.</td>
 </tr><tr>
  <td>STATUS_CTX_WINSTATION_NOT_FOUND 0xC00A0015</td>
  <td>Indicates the session does not exist.</td>
 </tr><tr>
  <td>STATUS_CTX_SHADOW_NOT_RUNNING 0xC00A0036</td>
  <td>Indicates the session is either not active or not being shadowed.</td>
 </tr><tr>
  <td>STATUS_ACCESS_DENIED 0xC0000022</td>
  <td>Indicates the caller does not have permission to end shadowing on the session.</td>
 </tr></tbody></table>
</dd></dl><p><b>LogonId: </b>The ID of the session on which to
stop shadowing operations.</p><p><b>bWait: </b>TRUE indicates wait for reset to
complete, FALSE otherwise.</p><p><b>Return Values: </b>Returns TRUE if the call
succeeded, and 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>