| Previous | Next |
| VFW_E_TIME_ALREADY_PASSED | TPC_E_RECOGNIZER_NOT_REGISTERED |
VFW_E_ALREADY_CANCELLED
Meaning
Windows documents VFW_E_ALREADY_CANCELLED as “The queued command has already been canceled”. In practical terms, it is returned when a DirectShow queued command or advise request has already been canceled when code attempts to cancel it again.
Likely causes
- Possible cause 1: two owners call cancel for the same token.
- Possible cause 2: timeout cleanup races normal completion cleanup.
- Possible cause 3: a stale command handle is reused after cancellation.
Evidence to collect
- Capture 1: command or advise token and owning component.
- Capture 2: first successful cancellation timestamp and thread.
- Capture 3: completion callback and cleanup call order.
Correct handling and retry
- Corrective action 1: make cancellation idempotent in the application layer.
- Corrective action 2: transfer token ownership explicitly.
- Corrective action 3: clear handles after completion or cancellation.
Retry guidance. Do not retry cancellation; treat the token as terminal and continue cleanup.
Practical scenario
A timeout thread and UI stop handler both cancel the same advise cookie; single-owner cleanup prevents it.
Difference from nearby HRESULTs
VFW_E_NO_ADVISE_SET means no successful advise existed, while it means an existing queued operation was already canceled.
Official Microsoft references
Looking for a different code? Search another status or error code.