FSCTL_TXFS_GET_TRANSACTED_VERSION IOCTL (winioctl.h)

Note

Microsoft strongly recommends developers utilize alternative means to achieve your application’s needs. Many scenarios that TxF was developed for can be achieved through simpler and more readily available techniques. Furthermore, TxF may not be available in future versions of Microsoft Windows. For more information, and alternatives to TxF, please see Alternatives to using Transactional NTFS.

Returns a TXFS_GET_TRANSACTED_VERSION structure. The structure identifies the most recently committed version of the specified file, the version number of the handle.

To perform this operation, call the DeviceIoControl function with the following parameters.

BOOL DeviceIoControl(
  (HANDLE) hDevice,                     // handle to device
  FSCTL_TXFS_GET_TRANSACTED_VERSION,    // dwIoControlCode
  NULL,                                 // lpInBuffer
  0,                                    // nInBufferSize
  (LPVOID) lpOutBuffer,                 // output buffer
  (DWORD) nOutBufferSize,               // size of output buffer
  (LPDWORD) lpBytesReturned,            // number of bytes returned
  NULL                                  // OVERLAPPED structure
);

Remarks

FSCTL_TXFS_GET_TRANSACTED_VERSION is a synchronous operation.

This control code can be use to track the latest version of a base file. For a specified handle, the base version is always the base value returned when the handle was opened, but the latest version changes based on any commit operations another transaction makes. If handle is then closed and opened again, base version and latest version are updated to new values and any subsequent commit operations from the other transaction change the latest version.

If you attempt to retrieve the version of a resource manager's root, the value TXFS_TRANSACTED_VERSION_NONTRANSACTED is returned.

ReFS:  This code is not supported.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header winioctl.h (include Windows.h)

See also