ITransactionExportFactory::GetRemoteClassId

GetRemoteClassId returns the class identifier of the local transaction manager. The class identifier can be used to ensure that a transaction manager of the proper type is present on the remote system. Having compatible transaction managers on the two systems makes it possible to propagate transactions between the systems.

HRESULT GetRemoteClassId (
CLSID *
pclsid);

Parameters

pclsid [out]
Pointer to the class identifier of the local transaction manager.

Return Values

S_OK
Success.

E_INVALIDARG
The value of pclsid is NULL.

Comments

This method is not needed when MS DTC is the only transaction manager being used. This method is present so that vendors other than Microsoft can provide OLE Transactions compliant transaction managers. These transaction managers could be used in place of MS DTC or in conjunction with it.

Resource managers that wish to work with a variety of transaction manager should have their RM proxy call this method. The RM proxy should examine the value returned in pclsid. If pclsid is CLSID_M01_MSDtcTmProxy, then MS DTC is being used as the local transaction manager. In this case, the remote resource manager can call the DtcGetTransactionManager helper function on the remote system. This will connect the remote resource manager to the MS DTC proxy Core Object on its system. If some other pclsid is returned, then the remote resource manager should call CoCreateInstance on the remote system with a class identifier of *pclsid. This will connect the remote resource manager to the appropriate transaction manager on that system.