MFCancelCreateFile

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

Syntax

HRESULT MFCancelCreateFile(
         IUnknown *pCancelCookie
)  

Parameters

pCancelCookie
Type: IUnknown *

A pointer to the IUnknown interface of the cancellation object. This pointer is received in the ppCancelCookie parameter of the MFBeginCreateFile function.

Return value

Type: HRESULT 

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

Return codes
Return code Description
S_OK The function succeeded.

Refer to Media Foundation return codes.

Remarks

You can use this function to cancel a previous call to MFBeginCreateFile. Because that function is asynchronous, however, it might complete before the operation can be canceled. Therefore, your callback might still be invoked after you call this function.

Requirements

Header: Declared in mfapi.h.

Library: Use Mfplat.lib.