<div class="content"><p> </p><p>The R_QMEnlistRemoteTransaction method propagates a
distributed atomic transaction context to the server. The server MUST enlist in
the transaction context. The client MUST call this method prior to the
R_StartTransactionalReceive (Opnum 13) (section <span><a href="c5296e0c-9e12-4fe8-a25d-56924982ac3e" data-linktype="relative-path">3.1.4.13)</a></span>
method or the R_MoveMessage (Opnum 10) (section <span><a href="81c28eb5-5658-4089-b8ac-7edc5d629e28" data-linktype="relative-path">3.1.4.10)</a></span>
method calls.<a id="Appendix_A_Target_27"></a><a aria-label="Product behavior note 27" href="4108f68e-80f5-40e1-b3df-b713cc4dff79#Appendix_A_27" data-linktype="relative-path">&lt;27&gt;</a> Subsequent calls to the <b>R_StartTransactionalReceive</b>
method and the <b>R_MoveMessage</b> method that use the same transaction
identifier are coordinated such that either all occur or none occurs, depending
on whether the transaction outcome is Commit or Rollback.</p><dl>
<dd>
<div><pre> HRESULT R_QMEnlistRemoteTransaction(
   [in] handle_t hBind,
   [in] XACTUOW* pTransactionId,
   [in, range(0, 131072)] DWORD cbPropagationToken,
   [in, size_is(cbPropagationToken)] 
     unsigned char* pbPropagationToken,
   [in] QUEUE_FORMAT* pQueueFormat
 );
</pre></div>
</dd></dl><p><b>hBind: </b>MUST be an RPC binding handle
parameter, as specified in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/a01f5886-c485-4bcf-bb23-e0d755510ab7" data-linktype="relative-path">2</a></span>.</p><p><b>pTransactionId: </b>MUST be a pointer to a
transaction identifier obtained as specified in <span><a href="../ms-dtco/c367c571-33f3-44ac-85cb-4b9ebbb2779d" data-linktype="relative-path">[MS-DTCO]</a></span>
section <span><a href="../ms-dtco/dd79ecf5-d330-4762-88d2-95d143d53617" data-linktype="relative-path">3.3.4.1</a></span>.
This value MUST NOT be NULL.</p><p><b>cbPropagationToken: </b>MUST be the size, in
bytes, of the <i>pbPropagationToken</i> parameter.</p><p><b>pbPropagationToken: </b>MUST be a transaction
propagation token, as specified in [MS-DTCO] section <span><a href="../ms-dtco/f5911ac2-7663-477b-bf76-8d4d01cc090c" data-linktype="relative-path">2.2.5.4</a></span>,
that represents the transaction identified by the <i>pTransactionId</i>
parameter. This parameter MUST NOT be NULL.</p><p><b>pQueueFormat: </b>MUST be a pointer to a <b>QUEUE_FORMAT</b>
(<span><a href="../ms-mqmq/b7cc2590-a617-45df-b6a3-1f31102b36fb" data-linktype="relative-path">[MS-MQMQ]</a></span>
section <span><a href="../ms-mqmq/905e154a-6123-42a9-86cb-e0a3169820f2" data-linktype="relative-path">2.2.7</a></span>)
structure that identifies the <span><a href="b23ea276-dfad-4083-bc48-d0f8a40255fd#gt_c1a6400d-703b-4f9a-a74c-40f1487978d9" data-linktype="relative-path">queue</a></span> to be passed
to the <b>R_StartTransactionalReceive</b> method. SHOULD<a id="Appendix_A_Target_28"></a><a aria-label="Product behavior note 28" href="4108f68e-80f5-40e1-b3df-b713cc4dff79#Appendix_A_28" data-linktype="relative-path">&lt;28&gt;</a> be ignored by the server.</p><p><b>Return Values: </b>On success, this method MUST return
MQ_OK (0x00000000).</p><p>If an error occurs, the server MUST return a failure <span><a href="../ms-dtyp/a9046ed2-bfb2-4d56-a719-2824afce59ac" data-linktype="relative-path">HRESULT</a></span>,
and the client MUST treat all failure <b>HRESULTs</b> identically.</p><p><b>MQ_OK</b> (0x00000000)</p><p>Exceptions Thrown:</p><p>No exceptions are thrown except those that are thrown by the
underlying <span><a href="b23ea276-dfad-4083-bc48-d0f8a40255fd#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> protocol, as
specified in [MS-RPCE].</p><p>While processing this operation, the server MUST:</p><ul><li><p><span><span> 
</span></span>Enlist into the transaction as specified in [MS-DTCO] section <span><a href="../ms-dtco/7edb35d0-f167-49f1-bf7e-a671fb28464c" data-linktype="relative-path">3.5.4.3</a></span>.</p>
</li><li><p><span><span> 
</span></span>Generate a <span><a href="../ms-mqdmpr/a44b2ff2-c914-44e2-ac21-4855718b39aa" data-linktype="relative-path">Create Transaction</a></span>
(<span><a href="../ms-mqdmpr/5eafe0a6-a22f-436b-a0d9-4cbc25c52b47" data-linktype="relative-path">[MS-MQDMPR]</a></span>
section 3.1.7.1.8) event with the following inputs: </p>
<ul><li><p><span><span>  </span></span><i>iTransactionIdentifier</i>
:= <i>pTransactionId</i></p>
</li></ul></li><li><p><span><span> 
</span></span>Return MQ_OK (0x00000000).</p>
</li></ul></div>