What does HRESULT 0xC0041822 (CI_E_ENUMERATION_STARTED) mean?

 
Previous Next
CI_INCORRECT_VERSION CI_E_PROPERTY_TOOLARGE

CI_E_ENUMERATION_STARTED

What the query state means

CI_E_ENUMERATION_STARTED (0xC0041822) means enumeration has already started for the Indexing Service query object. The important state is the lifetime of that query/enumerator, not the health of the catalog as a whole.

Evidence to preserve

  • Query object identity, catalog, scope and query text used to create it.
  • The call that first started enumeration and the thread that owns or consumes the result set.
  • The second operation that attempted to change or restart enumeration after the object had entered its active state.
  • Any wrapper or COM object that caches and reuses the same query instance across requests.

Focused test

Create a fresh query object with the same catalog and query text and perform the intended configuration before the first enumeration call. If the fresh object succeeds while the already-started object rejects the same change, the failure is object lifecycle rather than catalog contents.

Correction

Do not attempt to reconfigure an enumeration after the API has committed it to execution. Finish/release the current query and construct a new query object when different restrictions, columns or scope are required. If several callers share one object, serialize ownership or give each request its own query lifetime.

Verification

Run two controls: one query configured completely before enumeration must succeed, and one deliberate attempt to modify the already-started query must still return the expected state error. This proves the application handles the lifecycle instead of hiding it with retries.

Technical references


Looking for a different code? Search another status or error code.