Kernel32FindFirstStreamW Method

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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, 
	SetLastError = true)]
public static SafeFindHandle FindFirstStreamW(
	string fileName,
	FindStreamInfoLevels infoLevel,
	FindStreamData findStreamData,
	uint flags
)

Parameters

fileName  String
The fully qualified file name.
infoLevel  FindStreamInfoLevels
The information level of the returned data.
findStreamData  FindStreamData
A pointer to a buffer that receives the file stream data.

The format of this data depends on the value of the infoLevel parameter.

flags  UInt32
Reserved for future use. This parameter must be zero.

Return Value

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

If the function fails, the return value is INVALID_HANDLE_VALUE value (IntPtr(-1)).

To get extended error information, call GetLastWin32Error.

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

If the filesystem does not support streams, the function fails and GetLastWin32Error returns ERROR_INVALID_PARAMETER (87).

Remarks

See Also