MFBeginCreateFile Function
Begins an asynchronous request to create a byte stream from a file.
Syntax
HRESULT MFBeginCreateFile(
__in MF_FILE_ACCESSMODE AccessMode,
__in MF_FILE_OPENMODE OpenMode,
__in MF_FILE_FLAGS fFlags,
__in LPCWSTR pwszFilePath,
__in IMFAsyncCallback *pCallback,
__in IUnknown *pState,
__out IUnknown **ppCancelCookie
);
Parameter
AccessMode [in]
The requested access mode, specified as a member of the MF_FILE_ACCESSMODE enumeration.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.fFlags [in]
Bitwise OR of values from the MF_FILE_FLAGS enumeration.pwszFilePath [in]
Pointer to a null-terminated string containing the file name.pCallback [in]
Pointer to the IMFAsyncCallback interface of a callback object. The caller must implement this interfacepState [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.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.
Rückgabewert
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Rückgabecode | Beschreibung |
---|---|
S_OK | The function succeeded. |
Hinweise
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.
Anforderungen
Mindestens unterstützter Client |
Windows Vista |
Mindestens unterstützter Server |
Windows Server 2008 |
Header |
Mfapi.h |
Bibliothek |
Mfplat.lib |
DLL |
Mfplat.dll |