IObjectContext::IsInTransaction Method Example

#include <mtx.h>

IObjectContext* pObjectContext = NULL;
VARIANT_BOOL fInTransaction;
HRESULT hr;

hr = GetObjectContext(&pObjectContext);

// Find out if the object is in a transaction.
fInTransaction = pObjectContext->IsInTransaction();

if (!fInTransaction) {
	// If not, do something appropriate here.
}

© 1997 Microsoft Corporation. All rights reserved.