| Previous | Next |
| ERROR_FLT_ALREADY_ENLISTED | ERROR_FLT_NO_WAITER_FOR_REPLY |
ERROR_FLT_CONTEXT_ALREADY_LINKED
A context allocation is not a reusable template
ERROR_FLT_CONTEXT_ALREADY_LINKED means the same context object supplied as NewContext is already attached to an object after a successful FltSetXxxContext call. This differs from ERROR_FLT_CONTEXT_ALREADY_DEFINED, where the destination already owns some context and a newly allocated candidate loses the set race.
Filter Manager contexts are reference-counted objects with attachment state. One allocation cannot be installed simultaneously on several files, streams, volumes, or instances as shared mutable storage. Allocate a separate context for each target and place separately reference-counted shared data inside it when multiple contexts need to point to common policy or cache state.
Ownership corrections
- Trace the address of
NewContextand every successful set operation involving it. - Do not remove and immediately reuse a context unless the documented lifetime and references prove it is detached.
- Allocate per-object wrappers for shared state instead of attaching one context object repeatedly.
- Release caller references after successful attachment according to the set-context API contract.
References
- Microsoft: FltSetVolumeContext and already-linked contexts
- Microsoft: context attachment and references
- Microsoft: allocating distinct context objects
Looking for a different code? Search another status or error code.
