What does HRESULT 0x80040110 (CLASS_E_NOAGGREGATION) mean?

 
Previous Next
DRAGDROP_E_CONCURRENT_DRAG_ATTEMPTED CLASS_E_CLASSNOTAVAILABLE

CLASS_E_NOAGGREGATION

Class does not support aggregation (or class object is remote)

Windows defines CLASS_E_NOAGGREGATION as 2147746064 (0x80040110; signed value -2147221232). The documented description is “Class does not support aggregation (or class object is remote)”. The requested COM class cannot be created with the supplied controlling unknown. The relevant operation is IClassFactory::CreateInstance or CreateInstanceLic with non-null pUnkOuter.

Where it is raised

A COM class factory separates discovery of a class object from creation of an instance. Keeping those stages distinct reveals whether the defect is registration, factory selection, aggregation, licensing, or server implementation.

  • Associate this result with one exact operation in CoGetClassObject, IClassFactory::CreateInstance, aggregation rules, class availability, and optional licensing.
  • Confirm that this result came from IClassFactory::CreateInstance or CreateInstanceLic with non-null pUnkOuter, rather than from cleanup or a wrapper that ran afterward.

Telemetry checklist

A useful incident records the CLSID, requested IID, class context, server path, pUnkOuter value, factory interface, activation machine, license path, and the first server-side return.

  • Record whether pUnkOuter is null and which identity owns it.
  • Verify the aggregation rule that the initial riid must be IID_IUnknown.
  • distinguish in-process aggregation from attempting to aggregate a remote class object.

Why it is specific

  • It can result when the class deliberately does not implement COM aggregation.
  • It can result when the caller passes pUnkOuter when it intended containment or delegation.
  • It can result when the request asks for an initial IID other than IUnknown during aggregation.

Investigation order

  1. Identify the exact object, method, and lifecycle phase involved in IClassFactory::CreateInstance or CreateInstanceLic with non-null pUnkOuter.

Safe handling

Correction. create the object nonaggregated, redesign the relationship as containment, or use a class explicitly documented to support aggregation. Retry condition. Retry is valid only after changing pUnkOuter and the requested IID; repeated activation with the same outer object has no transient interpretation. Before repeating the operation, release any factory or partially initialized instance, determine whether a server process was launched, and avoid reusing a factory obtained before deployment or license state changed.

Practical scenario

A host passes its site object as pUnkOuter merely to receive callbacks; using a normal initialization interface after nonaggregated creation preserves separate identities.

Difference from related HRESULTs

CLASS_E_CLASSNOTAVAILABLE means the factory cannot supply the class at all; it is specifically about the requested identity model.

Developer and administrator guidance

Keep class-object discovery separate from CreateInstance, log pUnkOuter and the initial IID, and make licensed creation an explicit IClassFactory2 path. Regression coverage should include in-process and local-server contexts, null and non-null controlling unknowns, IID_IUnknown aggregation rules, stale factories after upgrade, and valid versus missing license state.

Verify the registered server path and product version with the supported installer, and use the vendor’s licensing mechanism rather than copying registration or license material between machines.

References


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