FindFirstStreamTransactedW function (winbase.h)

[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.]

Enumerates the first stream in the specified file or directory as a transacted operation.


HANDLE FindFirstStreamTransactedW(
  [in]  LPCWSTR            lpFileName,
  [in]  STREAM_INFO_LEVELS InfoLevel,
  [out] LPVOID             lpFindStreamData,
        DWORD              dwFlags,
  [in]  HANDLE             hTransaction


[in] lpFileName

The fully qualified file name.

The file must reside on the local computer; otherwise, the function fails and the last error code is set to ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE (6805).

[in] InfoLevel

The information level of the returned data. This parameter is one of the values in the STREAM_INFO_LEVELS enumeration type.

Value Meaning
The data is returned in a WIN32_FIND_STREAM_DATA structure.

[out] lpFindStreamData

A pointer to a buffer that receives the file data. The format of this data depends on the value of the InfoLevel parameter.


Reserved for future use. This parameter must be zero.

[in] hTransaction

A handle to the transaction. This handle is returned by the CreateTransaction function.

Return value

If the function succeeds, the return value is a search handle that can be used in subsequent calls to the FindNextStreamW function.

If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.


All files contain a default data stream. On NTFS, files can also contain one or more named data streams. On FAT file systems, files cannot have more that the default data stream, and therefore, this function will not return valid results when used on FAT filesystem files. This function works on all file systems that supports hard links; otherwise, the function returns ERROR_STATUS_NOT_IMPLEMENTED (6805).

The FindFirstStreamTransactedW function opens a search handle and returns information about the first stream in the specified file or directory. For files, this is always the default data stream, ::$DATA. After the search handle has been established, use it in the FindNextStreamW function to search for other streams in the specified file or directory. When the search handle is no longer needed, it should be closed using the FindClose function.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

Technology Supported
Server Message Block (SMB) 3.0 protocol No
SMB 3.0 Transparent Failover (TFO) No
SMB 3.0 with Scale-out File Shares (SO) No
Cluster Shared Volume File System (CsvFS) No
Resilient File System (ReFS) No

SMB 3.0 does not support TxF.


Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

File Management Functions




Transactional NTFS