3.3.4.1.4 RpcDisconnect (Opnum 3)
The RpcDisconnect method disconnects the specified session on the terminal server. This method MUST be called after RpcOpenSession. If the method succeeds, the state of the session is State_Disconnected as defined in the WINSTATIONSTATECLASS enumeration (section 2.2.1.9).
The caller MUST have WINSTATION_DISCONNECT permission to disconnect the session. The method checks whether the caller has WINSTATION_DISCONNECT permission (section 3.1.1) by setting it as the Access Request mask, and fails if the caller does not have the permission.
-
HRESULT RpcDisconnect( [in] SESSION_HANDLE hSession );
hSession: The handle to the session returned by RpcOpenSession. This is of type SESSION_HANDLE.
Return Values: The method MUST return S_OK (0x00000000) on success; otherwise, it MUST return an implementation-specific negative value.
-
Return value/code
Description
0x00000000
S_OK
Successful completion.