Attempts to cancel an asynchronous operation that was scheduled with MFScheduleWorkItem or MFScheduleWorkItemEx.
HRESULT MFCancelWorkItem(
MFWORKITEM_KEY Key
)
Key
Type: MFWORKITEM_KEY
The key that was received in the pKey parameter of the MFScheduleWorkItem or MFScheduleWorkItemEx function.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
Because work items are asynchronous, the work-item callback might still be invoked after MFCancelWorkItem is called.
Header: Declared in mfapi.h.
Library: Use Mfplat.lib.