Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 3.65 KB

nf-mfapi-mfbegincreatefile.md

File metadata and controls

113 lines (86 loc) · 3.65 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mfapi.MFBeginCreateFile
MFBeginCreateFile function (mfapi.h)
Begins an asynchronous request to create a byte stream from a file.
MFBeginCreateFile
MFBeginCreateFile function [Media Foundation]
aca304f6-cf7c-43ea-8ebe-d3bb46f8a2fd
mf.mfbegincreatefile
mfapi/MFBeginCreateFile
mf\mfbegincreatefile.htm
mf
aca304f6-cf7c-43ea-8ebe-d3bb46f8a2fd
12/05/2018
MFBeginCreateFile, MFBeginCreateFile function [Media Foundation], aca304f6-cf7c-43ea-8ebe-d3bb46f8a2fd, mf.mfbegincreatefile, mfapi/MFBeginCreateFile
mfapi.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Mfplat.lib
Mfplat.dll
Windows
19H1
MFBeginCreateFile
mfapi/MFBeginCreateFile
c++
APIRef
kbSyntax
DllExport
mfplat.dll
MFBeginCreateFile

MFBeginCreateFile function

-description

Begins an asynchronous request to create a byte stream from a file.

-parameters

-param AccessMode [in]

The requested access mode, specified as a member of the MF_FILE_ACCESSMODE enumeration.

-param OpenMode [in]

The behavior of the function if the file already exists or does not exist, specified as a member of the MF_FILE_OPENMODE enumeration.

-param fFlags [in]

Bitwise OR of values from the MF_FILE_FLAGS enumeration.

-param pwszFilePath [in]

Pointer to a null-terminated string containing the file name.

-param pCallback [in]

Pointer to the IMFAsyncCallback interface of a callback object. The caller must implement this interface

-param pState [in]

Pointer to the IUnknown interface of a state object, defined by the caller. This parameter can be NULL. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.

-param ppCancelCookie [out]

Receives an IUnknown pointer or the value NULL. If the value is not NULL, you can cancel the asynchronous operation by passing this pointer to the MFCancelCreateFile function. The caller must release the interface. This parameter is optional and can be NULL.

-returns

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The function succeeded.

-remarks

When the request is completed, the callback object's IMFAsyncCallback::Invoke method is called. The callback object should then call the MFEndCreateFile function to get a pointer to the byte stream.

-see-also

Media Foundation Functions