Resource Manager Objects
Resource manager objects represent resource managers. Each resource manager must call ZwCreateResourceManager to register itself to KTM.
KTM provides a set of resource manager object routines that kernel-mode resource managers can call. KTM also provides a similar set of user-mode routines that user-mode applications can call. For more information about the user-mode routines, see the Microsoft Windows SDK.
KTM creates a resource manager object when a resource manager calls ZwCreateResourceManager.
Resource managers close their handles to resource manager objects by calling ZwClose. If the last handle is closed, and if the resource manager still has enlistments to transactions that have not been committed, KTM sends TRANSACTION_NOTIFY_ROLLBACK notifications to all resource managers for the transactions that are associated with those enlistments.
The operating system deletes the object after the last handle is closed and KTM has released all its references to the object.