MFAddPeriodicCallback function (mfapi.h)
Sets a callback function to be called at a fixed interval.
Syntax
HRESULT MFAddPeriodicCallback(
[in] MFPERIODICCALLBACK Callback,
[in] IUnknown *pContext,
[out] DWORD *pdwKey
);
Parameters
[in] Callback
Pointer to the callback function, of type MFPERIODICCALLBACK.
[in] pContext
Pointer to a caller-provided object that implements IUnknown, or NULL. This parameter is passed to the callback function.
[out] pdwKey
Receives a key that can be used to cancel the callback. To cancel the callback, call MFRemovePeriodicCallback and pass this key as the dwKey parameter.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The function succeeded. |
Remarks
To get the timer interval for the periodic callback, call MFGetTimerPeriodicity.
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 |