3.3.4.6 BeginTearDown (Opnum 5)
The BeginTearDown method is invoked by a secondary partner to request that a primary partner begin session teardown.
-
HRESULT BeginTearDown( [in] PCONTEXT_HANDLE contextHandle, [in] TEARDOWN_TYPE tearDownType );
contextHandle: An RPC context handle that is correlated with a session object that is in the Active state. For context handles, see [C706].
tearDownType: The reason for tearing down the session. It MUST be set to 0x00 (TT_FORCE).
-
Value
Meaning
0x00
Return Values: This method MUST return zero (0x00000000) on success. On failure, it MUST return an implementation-specific HRESULT. A client MUST NOT depend on implementation-specific failure HRESULT values. From an over-the-wire communication point of view, the client MUST implement only a behavior for the case when the call succeeds and another behavior for the case when the call does not succeed, (see section 3.4.6.2). Standard errors are defined in [MS-ERREF] section 2.2.
-
Return value/code
Description
0x00000000
ERROR_STATUS
The return value indicates success.
BeginTearDown MUST NOT be invoked on a secondary partner.
If the session object is in the Teardown state, the primary partner MUST immediately return from the method with S_OK. Otherwise, the primary partner MUST set the state of the session object associated with the context handle to Teardown and return S_OK from the method. Also, it MUST start the Session Teardown timer associated with that session object and attempt to call the TearDownContext method on the secondary partner. The secondary partner SHOULD choose to perform these actions asynchronously.