MFCancelCreateFile function (mfapi.h)

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

Syntax

HRESULT MFCancelCreateFile(
  [in] IUnknown *pCancelCookie
);

Parameters

[in] pCancelCookie

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

Return value

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

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

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header mfapi.h
Library Mfplat.lib
DLL Mfplat.dll

See also

Media Foundation Functions