Cancels an asynchronous request to create a byte stream from a file.
HRESULT MFCancelCreateFile(
IUnknown *pCancelCookie
)
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.
Type: HRESULT
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. |
Refer to Media Foundation return codes.
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.
Header: Declared in mfapi.h.
Library: Use Mfplat.lib.