1 out of 1 rated this helpful - Rate this topic

FindFirstStreamW function

Applies to: desktop apps only

Enumerates the first stream with a ::$DATA stream type in the specified file or directory.

To perform this operation as a transacted operation, use the FindFirstStreamTransactedW function.

Syntax

HANDLE WINAPI FindFirstStreamW(
  __in        LPCWSTR lpFileName,
  __in        STREAM_INFO_LEVELS InfoLevel,
  __out       LPVOID lpFindStreamData,
  __reserved  DWORD dwFlags
);

Parameters

lpFileName [in]

The fully qualified file name.

InfoLevel [in]

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

ValueMeaning
FindStreamInfoStandard
0

The data is returned in a WIN32_FIND_STREAM_DATA structure.

 

lpFindStreamData [out]

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

dwFlags

Reserved for future use. This parameter must be zero.

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.

If no streams can be found, the function fails and GetLastError returns ERROR_HANDLE_EOF (38).

Remarks

The FindFirstStreamW function opens a search handle and returns information about the first ::$DATA 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.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

File Management Functions
FindClose
FindFirstStreamTransactedW
FindNextStreamW
STREAM_INFO_LEVELS
WIN32_FIND_STREAM_DATA

 

 

Send comments about this topic to Microsoft

Build date: 4/17/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ