3.7.4.1.28 RpcWinStationShadowStop (Opnum 59)

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 WINSTATIONSTATECLASS enumeration (section 2.2.1.9).

Caller MUST have WINSTATION_DISCONNECT and WINSTATION_RESET permissions. For each aforementioned required permission, the method checks whether the caller has the permission (section 3.1.1) by setting the Access Request mask to the specific permission, and fails if the caller does not have the permission.<206>

 BOOLEAN RpcWinStationShadowStop(
   [in] SERVER_HANDLE hServer,
   [out] DWORD* pResult,
   [in] DWORD LogonId,
   [in] BOOLEAN bWait
 );

hServer: Handle to the server object. This is of type SERVER_HANDLE. The hServer argument MUST be obtained from a previous call to RpcWinStationOpenServer.

pResult: Failure error code if the call to RpcWinStationShadowStop failed. If the call was successful, this parameter MUST be STATUS_SUCCESS (0x00000000).

Value

Meaning

STATUS_SUCCESS

0x00000000

The call was successful.

STATUS_CTX_WINSTATION_NOT_FOUND

0xC00A0015

Indicates the session does not exist.

STATUS_CTX_SHADOW_NOT_RUNNING

0xC00A0036

Indicates the session is either not active or not being shadowed.

STATUS_ACCESS_DENIED

0xC0000022

Indicates the caller does not have permission to end shadowing on the session.

LogonId: The ID of the session on which to stop shadowing operations.

bWait: TRUE indicates wait for reset to complete, FALSE otherwise.

Return Values: Returns TRUE if the call succeeded, and FALSE if the method failed. On failure, pResult indicates the failure status code.

Return value/code

Description

0x01

TRUE

Successful completion.

0x00

FALSE

Method call failed.