Creates a byte stream from a file.
HRESULT MFCreateFile(
MF_FILE_ACCESSMODE AccessMode,
MF_FILE_OPENMODE OpenMode,
MF_FILE_FLAGS fFlags,
LPCWSTR pwszFileURL,
IMFByteStream **ppIByteStream
)
AccessMode
Type: MF_FILE_ACCESSMODE
The requested access mode, specified as a member of the MF_FILE_ACCESSMODE enumeration.
OpenMode
Type: MF_FILE_OPENMODE
The behavior of the function if the file already exists or does not exist, specified as a member of the MF_FILE_OPENMODE enumeration.
fFlags
Type: MF_FILE_FLAGS
Bitwise OR of values from the MF_FILE_FLAGS enumeration.
pwszFileURL
Type: LPCWSTR
Pointer to a null-terminated string that contains the file name.
ppIByteStream
Type: IMFByteStream **
[out] Receives a pointer to the IMFByteStream interface of the byte stream. The caller must release the interface.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
Header: Declared in mfapi.h.
Library: Use Mfplat.lib.