Condividi tramite


IKernelTransaction

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The IKernelTransaction interface is used to get a transaction handle that can then be passed into transacted Windows APIs. A pointer to this interface is obtained from an ITransaction object that represents an MS Distributed Transaction Coordinator (MSDTC) transaction.

When to Implement

You do not need to implement this interface. It is implemented by the ITransaction object.

When to Use

Transacted Windows APIs, such as CreateFileTransacted or RegCreateKeyTransacted, require a handle that represents the transaction to be passed as a parameter. Use the IKernelTransaction interface to obtain a handle that represents the transaction to pass to a transacted Windows API.

Methods in Vtable Order

IKernelTransaction method Description
GetHandle Returns a handle that represents the transaction and can be passed as a parameter to transacted Windows APIs.

Remarks

You can obtain a pointer to this interface by calling IUnknown::QueryInterface on the ITransaction interface on the transaction object with an riid of IID_IKernelTransaction.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in transact.h