3.9.4.1.3 Abort (Opnum 9)

The Abort method is received by the server in an RPC_REQUEST packet. In response, the server MUST abort the message queuing internal transaction or external transaction.

 HRESULT Abort(
   [in, optional] VARIANT* fRetaining,
   [in, optional] VARIANT* fAsync
 );

fRetaining: A pointer to a VARIANT that contains a VARIANT_BOOL. This flag specifies whether to retain the transaction when it is finished.

If this parameter is not specified by the client, the server MUST use the default value VARIANT_FALSE (0x0000) in place of the unspecified value.

fAsync: A pointer to a VARIANT that contains a VARIANT_BOOL that specifies whether the abort is done synchronously (False) or asynchronously (True). If a value is not specified by the client, the server MUST use the default value VARIANT_FALSE (0x0000).

Return Values: The method MUST return S_OK (0x00000000) to indicate success or an implementation-specific error HRESULT on failure.

When the server processes this call, it MUST follow these guidelines:

  • If the Transaction instance variable is NULL:

    • Return E_INVALIDARG (0x80070057), and take no further action.

  • Abort the transaction by invoking the Abort method (ITransaction::Abort section 3.8.4.1.2) on the Transaction instance variable, with the following parameters:

    • pboidReason = NULL

    • fRetaining = input parameter fRetaining

    • fAsync = input parameter fAsync