ShlwApiSHCreateStreamOnFile(String, StorageModeFlags, IStream) Method
Opens or creates a file and retrieves a stream to read or write to that file.
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("ShlwApi.dll", CharSet = CharSet.Unicode)]
public static HResult SHCreateStreamOnFile(
string fileName,
StorageModeFlags storageMode,
ref IStream refStream
)
<DllImportAttribute("ShlwApi.dll", CharSet := CharSet.Unicode>]
Public Shared Function SHCreateStreamOnFile (
fileName As String,
storageMode As StorageModeFlags,
ByRef refStream As IStream
) As HResult
Dim fileName As String
Dim storageMode As StorageModeFlags
Dim refStream As IStream
Dim returnValue As HResult
returnValue = ShlwApi.SHCreateStreamOnFile(fileName,
storageMode, refStream)
public:
[DllImportAttribute(L"ShlwApi.dll", CharSet = CharSet::Unicode)]
static HResult SHCreateStreamOnFile(
String^ fileName,
StorageModeFlags storageMode,
IStream^% refStream
)
[<DllImportAttribute("ShlwApi.dll", CharSet = CharSet.Unicode)>]
static member SHCreateStreamOnFile :
fileName : string *
storageMode : StorageModeFlags *
refStream : IStream byref -> HResult
No code example is currently available or this language may not be supported.
- fileName String
-
Specifies the file name.
- storageMode StorageModeFlags
-
One or more StorageModeFlags values that are used to specify the
file access mode and how the object that exposes the stream is created and deleted.
- refStream IStream
-
Receives an IStream interface for the stream associated with the file.
HResult
If this function succeeds, it returns
S_OK.
Otherwise, it returns an
HResult error code.