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 );
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.
MQReceiveMessage, MQSendMessage