ITransactionContext::CreateInstance method (comsvcs.h)
Creates a COM object that can execute within the scope of the transaction that was initiated by the transaction context object.
Syntax
HRESULT CreateInstance(
[in] BSTR pszProgId,
[out] VARIANT *pObject
);
Parameters
[in] pszProgId
A reference to the ProgID of the type of object to be instantiated.
[out] pObject
A reference to the new object.
Return value
This method can return the standard return values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, E_FAIL, and S_OK.
Remarks
If the Microsoft Distributed Transaction Coordinator is not running and the object is transactional, the object is successfully created. However, method calls to that object will fail with CONTEXT_E_TMNOTAVAILABLE. Objects cannot recover from this condition and should be released.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | comsvcs.h |