Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If you are writing a service or component and need to use transactional services or if you need to monitor the state of a kernel transaction, you need to create a resource manager (RM).
To write a resource manager, you must create multiple kernel objects. The objects that an RM uses are:
First, create a TM object. There are two types of TMs:
To create a durable TM, you must either create a CLFS log and call CreateTransactionManager or have KTM create it for you. After a durable TM is created, you must first recover the TM by calling RecoverTransactionManager. After the TM is recovered, it is available for use.
If you recovered an existing TM, all RMs associated with this TM will start receiving recovery messages. For more information, see Recovery Processing.
Next, you create a resource manager by calling CreateResourceManager with the TM handle. The RM can be volatile or durable. Only durable TMs can be used with durable RMs.
When working transactionally, you enlist in the transaction by calling CreateEnlistmentand specifying which notifications to receive.
Note You can start receiving notifications before the call to CreateEnlistment is completed.
When you receive a notification, call the appropriate "Complete*" function when any work associated with processing the notification is completed. The complete functions are:
If at any time a resource manager is unable to complete the work of the transaction, or if continuing would render your application unable to undo the work done within the transaction, you must roll back the transaction by calling RollbackEnlistment.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayTraining