MQBeginTransaction

The MQBeginTransaction function creates an internal MSMQ transaction object that can be used to send messages to a queue or read messages from a queue.

HRESULT APIENTRY MQBeginTransaction(
  Transaction **ppTransaction  
);
 

Parameters

ppTransaction
[out] Pointer to Transaction variable that points to the new transaction object.

Return Values

MQ_OK
Indicates success.
MQ_ERROR_INSUFFICIENT_RESOURCES
There are no resources to create a new transaction.

Remarks

The pointer returned by MQBeginTransaction can be used to set the pTransaction parameter of MQSendMessage or MQReceiveMessage.

For a description of internal transactions, see MSMQ Internal Transactions.

For an example of an internal transaction, see Sending Messages Using an Internal Transaction.

See Also

MQReceiveMessage, MQSendMessage


© 1997 by Microsoft Corporation. All rights reserved.