3.1.5.1 QMSendMessageInternalEx (Opnum 0)

A client invokes QMSendMessageInternalEx if the server returns STATUS_RETRY (0xc000022d) from a prior call to rpc_ACSendMessageEx. Implementations of this protocol SHOULD NOT return STATUS_RETRY from rpc_ACSendMessageEx, rendering this method unnecessary. Such implementations MUST take no action when QMSendMessageInternalEx is invoked and return MQ_ERROR_ILLEGAL_OPERATION (0xc00e0064).

 HRESULT QMSendMessageInternalEx(
   [in] handle_t hBind,
   [in] QUEUE_FORMAT* pQueueFormat,
   [in] struct CACTransferBufferV2* ptb,
   [in, out, unique] OBJECTID* pMessageID
 );

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

pQueueFormat: MUST be a pointer to a QUEUE_FORMAT ([MS-MQMQ] section 2.2.7) structure, which identifies an existing queue to be opened. MUST NOT be NULL, and MUST conform to the format name syntax rules defined in [MS-MQMQ]. The queue identified by pQueueFormat MUST be local to the supporting server, and MUST be successfully openable via a call to rpc_QMOpenQueueInternal with a dwDesiredAccess level of MQ_SEND_ACCESS (0x00000002).

ptb: A CACTransferBufferV2 structure pointer as described in section 2.2.3.3. See the identical parameter in section 3.1.5.2 for details on this parameter.

pMessageID: An OBJECTID as defined in [MS-MQMQ] section 2.2.8. See the identical parameter in section 3.1.5.2 for details on this parameter.

Return Values:  On success, this method MUST return MQ_OK (0x00000000); otherwise, the server MUST return a failure HRESULT,<67> and the client MUST treat all failure HRESULTs identically. Additionally, if a failure HRESULT is returned, the client MUST disregard all out-parameter values.

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:

  • Determine if input parameter values violate constraints specified above. If an invalid parameter is detected, the server MUST take no further action and return a failure HRESULT.

  • Open the queue identified by pQueueFormat by invoking rpc_QMOpenQueueInternal with dwDesiredAccess of MQ_SEND_ACCESS (0x00000002).

  • If this process is successful:

    • With the queue handle obtained from rpc_QMOpenQueueInternal, invoke rpc_ACSendMessageEx as specified in section 3.1.5.2.

    • Invoke rpc_ACCloseHandle to dispose the handle obtained above. Return the result of rpc_ACSendMessageEx.

  • Else:

    •  Return a failure HRESULT.