A client calls the R_QMEnlistTransaction method to enlist the supporting server's resource manager (RM) in an external transaction.

 HRESULT
 R_QMEnlistTransaction(
     [in] handle_t hBind,
     [in] XACTUOW* pUow,
     [in, range(0, 131072)] DWORD cbCookie,
     [in, size_is (cbCookie)]  unsigned char* pbCookie 
     );

hBind:  MUST be set to an RPC binding handle as described in [MS-RPCE] section 2.

pUow:  MUST point to an XACTUOW structure ([MS-MQMQ] section 2.2.18.1.8) that identifies the external transaction in which the server is to enlist, as specified in section 2.2.3.1.

cbCookie:  MUST be set to the byte length of the buffer pointed to by pbCookie.

pbCookie: MUST be a pointer to an array of bytes containing an exported transaction cookie, which can be obtained as specified in [MS-DTCO] section 3.3.4.14.

Return Values:  On success, this method MUST return MQ_OK (0x00000000); otherwise, the server MUST return a failure HRESULT,<43> and the client MUST treat all failure HRESULTs identically.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE].

This method is invoked at the dynamically assigned endpoint returned by the R_QMGetRTQMServerPort method when IP_HANDSHAKE (0x00000000) or IPX_HANDSHAKE (0x00000002) is the interface specified by the fIP parameter.

When processing this call, the server MUST: