What does HRESULT 0x80004010 (CO_E_INIT_SCM_MAP_VIEW_OF_FILE) mean?

 
Previous Next
CO_E_INIT_SCM_FILE_MAPPING_EXISTS CO_E_INIT_SCM_EXEC_FAILURE

CO_E_INIT_SCM_MAP_VIEW_OF_FILE

COM could not map OLE service shared memory

CO_E_INIT_SCM_MAP_VIEW_OF_FILE is HRESULT 2147500048 (0x80004010) from winerror.h. The documented description is “Unable to map view of file for OLE service.” The value must be interpreted at the activation service shared-memory initialization path.

The named file mapping was opened or created but its view could not be mapped into the process. When this result crosses a language or process boundary, preserve its original numeric form before projections replace it with a broad exception class.

Where the result appears

  • This result may surface in the activation service shared-memory initialization path.

Typical causes and interpretation

Common cause categories are: address space is fragmented; protection or access rights are wrong; the mapping is truncated; endpoint protection blocks the mapping operation. Do not treat the cause list as a checklist of simultaneous failures; use traces and postconditions to select the matching branch.

Key distinction: the named file mapping was opened or created but its view could not be mapped into the process.

Correct handling and recovery

The appropriate recovery is to inspect the mapping size and protection, remove address-space pressure, correct permissions, and restart both sides when mapping versions differ. A retry policy needs a bounded attempt count, a state refresh step, and a rule for reconciling work that may already have completed.

Cleanup following it must be generation-aware: do not destroy shared state or outputs owned by an earlier successful operation.

Practical scenario

A 32-bit host with severe address-space fragmentation opens the activation mapping but cannot reserve a contiguous view.

Coverage should include the exact failure, a corrected success case, and the closest related HRESULT so classification remains stable.

Difference from related HRESULTs

CO_E_INIT_SCM_FILE_MAPPING_EXISTS concerns an unexpected existing mapping; this code means mapping the view failed.

Tests and telemetry should retain the producing component and operation so future wrappers do not flatten this result into an ambiguous generic exception.

References


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