A client calls R_QMGetTmWhereabouts to obtain transaction manager whereabouts, as specified in [MS-DTCO], from the supporting server. The whereabouts enable callers to generate exported transaction cookies, which are required to enlist the supporting server's resource manager (RM) in an external transaction.

 HRESULT R_QMGetTmWhereabouts(
   [in] handle_t hBind,
   [in, range(0,131072)] DWORD cbBufSize,
   [out, size_is(cbBufSize)] unsigned char* pbWhereabouts,
   [out] DWORD* pcbWhereabouts
 );

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

cbBufSize:  MUST be set to the byte length of the buffer pointed to by pbWhereabouts. If this value is 0x00000000, the server MUST ignore the pbWhereabouts parameter.

pbWhereabouts:  On success, points to an array of bytes containing a Distributed Transaction Coordinator (DTC) SWhereabouts structure, as specified in [MS-DTCO] section 2.2.5.11.

pcbWhereabouts:  On success, or ifMQ_ERROR_USER_BUFFER_TOO_SMALL (0xc00e0028) is returned, pcbWhereabouts points to a DWORD containing the byte length of the SWhereabouts structure retrieved from the DTC; otherwise, this parameter MUST be ignored.

Return Values: On success, this method MUST return MQ_OK (0x00000000); otherwise, the server MUST return a failure HRESULT. The client MUST treat all failure HRESULTs identically and disregard all out-parameter values, with the following exception:

If cbBufSize is less than the size of the SWhereabouts structure returned by the DTC, the server MUST return  MQ_ERROR_USER_BUFFER_TOO_SMALL (0xc00e0028).

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: