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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, ExactSpelling := true,
SetLastError := true>]
Public Shared Function FindFirstStreamW (
fileName As String,
infoLevel As FindStreamInfoLevels,
<OutAttribute> findStreamData As FindStreamData,
flags As UInteger
) As SafeFindHandle
Dim fileName As String
Dim infoLevel As FindStreamInfoLevels
Dim findStreamData As FindStreamData
Dim flags As UInteger
Dim returnValue As SafeFindHandle
returnValue = Kernel32.FindFirstStreamW(fileName,
infoLevel, findStreamData, flags)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, ExactSpelling = true,
SetLastError = true)]
static SafeFindHandle^ FindFirstStreamW(
String^ fileName,
FindStreamInfoLevels infoLevel,
[InAttribute] [OutAttribute] FindStreamData findStreamData,
unsigned int flags
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = true,
SetLastError = true)>]
static member FindFirstStreamW :
fileName : string *
infoLevel : FindStreamInfoLevels *
findStreamData : FindStreamData byref *
flags : uint32 -> SafeFindHandle
No code example is currently available or this language may not be supported.
- 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.
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).