Some resource managers are capable of calling application code from within the resource manager. This permits the application programmer to perform operations that the resource manager and its stored procedure programming language do not directly support. If your resource manager supports this capability, you may choose to provide a way to propagate transactions from your resource manager to the application.
Resource Manager-to-Application Program Transaction Propagation
For example, your resource manager could provide a callback that returns the current transaction to the application program. The callback might have an interface such as this:
int rm_getdtcxact (SRVPROC *srvproc, void **ppv);
This interface returns a pointer to the current transaction object through ppv. If no transaction is active, ppv is null. The interface returns SUCCEED if successful, or FAIL if the server callback was not registered in the server. (This would only happen due to a DLL mismatch.)