What does HRESULT 0x80020011 (DISP_E_NOTACOLLECTION) mean?

 
Previous Next
DISP_E_BADCALLEE DISP_E_DIVBYZERO

DISP_E_NOTACOLLECTION

Automation object does not support collection semantics

DISP_E_NOTACOLLECTION is HRESULT 2147614737 (0x80020011) from winerror.h. The documented description is “Does not support a collection.” The value must be interpreted at generic Automation code attempting enumeration or indexed default-property access.

The selected dispatch object has no collection contract for the requested operation. Keep the symbolic name beside the raw hexadecimal value so later analysis does not collapse the result into an unrelated COM family.

Where the result appears

  • This result is returned while Automation binds or executes generic Automation code attempting enumeration or indexed default-property access.

Determine the object and lifecycle phase that owned this result; a UI symptom cannot establish whether the origin was the caller, proxy, runtime, server, or metadata producer.

Typical causes and interpretation

Common cause categories are: the caller received a scalar object; the wrong property was selected; a version removed collection behavior; default-member assumptions are invalid. Evaluate these branches independently and require evidence from the owning API before promoting one branch to the root cause.

Key distinction: the selected dispatch object has no collection contract for the requested operation.

Evidence to preserve

  • Record this result with the object CLSID or ProgID, interface identity, member DISPID, dispatch flags, and type-library version.
  • Capture object type and IID; requested _NewEnum or Item member; invocation flags; type-info attributes; caller assumption.

Log identifiers, sizes, type tags, states, and hashes while excluding credentials, tokens, document payloads, and complete user arguments.

Correct handling and recovery

The appropriate recovery is to query documented collection interfaces or members, branch on capability, and avoid treating every IDispatch object as enumerable. The owner of retry must define idempotency, refreshed state, maximum attempts, backoff, and cancellation responsibility.

After it, apply the API-specific validity rules to outputs and release only resources whose ownership transferred during this attempt.

Practical scenario

A scripting adapter receives a single worksheet rather than a worksheets collection and stops requesting _NewEnum.

A regression test should force the relevant precondition, assert native outputs, fix only that condition, and confirm the expected neighboring result.

Difference from related HRESULTs

DISP_E_BADINDEX means a collection exists but the index is invalid; it means collection behavior is absent.

Represent this distinction directly in control flow and dashboards instead of grouping it under a single COM-failure label.

References


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