| Previous | Next |
| CO_E_FAILEDTOSETDACL | CO_E_NETACCESSAPIFAILED |
CO_E_ACCESSCHECKFAILED
COM access check could not be completed successfully
CO_E_ACCESSCHECKFAILED is HRESULT 2147549482 (0x8001012A) from winerror.h. AllStat describes it as “The system function, AccessCheck, returned false.” In the COM IAccessControl, DCOM client identity, trustee translation, token inspection, security descriptor, ACL, or serialization workflow, the code identifies a specific failure boundary and should not be replaced by a generic COM exception.
Handling CO_E_ACCESSCHECKFAILED correctly requires the code-specific postcondition, not merely the fact that FAILED(hr) is true.
Diagnostic sequence
- Capture the raw unsigned value
0x8001012Aand symbolic nameCO_E_ACCESSCHECKFAILEDbefore a language projection, exception wrapper, or generic COM helper replaces it. - Identify the exact interface, method, callback, activation request, metadata query, access-control operation, or marshaling boundary that returned
CO_E_ACCESSCHECKFAILED. - Reconstruct the operation timeline for
CO_E_ACCESSCHECKFAILED, including object creation, thread or apartment initialization, security setup, callbacks, mutations, shutdown, and cleanup. - Prove the decisive condition: the client token, descriptor owner/group, DACL, generic mapping, desired mask, privilege buffer, and API return are all captured.
- Inspect every output parameter, handle, interface pointer, token, SID, ACL, stream, buffer, server-side object, or asynchronous result produced before
CO_E_ACCESSCHECKFAILED. - Reproduce
CO_E_ACCESSCHECKFAILEDwith the smallest safe input, change only the suspected precondition, and verify that both the HRESULT and postcondition change as predicted.
Where it is encountered
CO_E_ACCESSCHECKFAILEDcan be returned during IAccessControl initialization, access checks, owner/trustee processing, and serialized ACL persistence. ForCO_E_ACCESSCHECKFAILED, record the interface, method, component version, thread, apartment, process, and correlation ID.CO_E_ACCESSCHECKFAILEDcan be returned during server-side DCOM impersonation, client blanket inspection, token and SID lookup. ForCO_E_ACCESSCHECKFAILED, record the interface, method, component version, thread, apartment, process, and correlation ID.CO_E_ACCESSCHECKFAILEDcan be returned during security descriptor construction, DACL canonicalization, file-backed policy storage, or legacy NetAccess migration. ForCO_E_ACCESSCHECKFAILED, record the interface, method, component version, thread, apartment, process, and correlation ID.
The immediate focus for CO_E_ACCESSCHECKFAILED is an <code>AccessCheck</code>-based decision where the function fails or returns an unusable evaluation instead of a trustworthy granted/denied result. Keep CO_E_ACCESSCHECKFAILED attached to that operation; the same numeric severity outside the owning API does not supply enough context.
Decisive interpretation boundary
Before choosing recovery, verify that the client token, descriptor owner/group, DACL, generic mapping, desired mask, privilege buffer, and API return are all captured. If this condition cannot be proven for CO_E_ACCESSCHECKFAILED, stop before consuming outputs or repeating side effects.
For CO_E_ACCESSCHECKFAILED, also confirm that all observed objects, tokens, buffers, proxies, metadata files, or ACLs belong to the current operation generation and were not retained from an earlier attempt.
Evidence and telemetry
- Preserve desired and mapped access masks for
CO_E_ACCESSCHECKFAILED. - Preserve client impersonation token for
CO_E_ACCESSCHECKFAILED. - Preserve security descriptor owner, group, and DACL for
CO_E_ACCESSCHECKFAILED. - Preserve privilege-set buffer sizes for
CO_E_ACCESSCHECKFAILED. - Preserve AccessCheck return, AccessStatus, and last error for
CO_E_ACCESSCHECKFAILED.
For CO_E_ACCESSCHECKFAILED, also record UTC time, process and thread IDs, apartment type, component version, security or package identity where relevant, and a correlation ID. For CO_E_ACCESSCHECKFAILED, use hashes, lengths, GUIDs, and SID strings rather than logging confidential payloads or credentials.
Difference from nearby HRESULTs
CO_E_ACCESSCHECKFAILED means authorization evaluation itself failed; RPC_E_ACCESS_DENIED is a completed denial at the COM/RPC boundary.
A support tool discussing CO_E_ACCESSCHECKFAILED should name the neighboring result only after the originating API and decisive state are known.
Correct handling and recovery
Treat the operation as denied, correct descriptor or token defects, map generic rights, and repeat only after the access-check inputs are valid.
Repeat the operation after CO_E_ACCESSCHECKFAILED only when the documented precondition, identity, apartment, object generation, buffer, or configuration has changed.
Practical scenario
A private-object server passes an unmapped generic access mask to <code>AccessCheck</code>. It calls <code>MapGenericMask</code> and records the granted mask separately from function success.
A regression test should reproduce CO_E_ACCESSCHECKFAILED, assert the raw HRESULT and all relevant outputs, then correct only the decisive condition and verify the intended success or neighboring failure result.
Lifetime, retry, and cleanup rules
After CO_E_ACCESSCHECKFAILED, determine whether the current object, interface pointer, call context, token, stream, metadata reader, asynchronous operation, or access-control instance remains valid. For CO_E_ACCESSCHECKFAILED, release only resources owned by the failing attempt, cancel callbacks through their documented mechanism, and avoid double close, double commit, repeated activation, or replay of a non-idempotent remote method.
The retry policy for CO_E_ACCESSCHECKFAILED should state the trigger, maximum attempts, cancellation owner, and reconciliation step for effects that may have completed elsewhere.
Developer and administrator guidance
A support bundle for CO_E_ACCESSCHECKFAILED should include first-occurrence logs, interface and component identity, object generation, relevant policy, and safe hashes. For CO_E_ACCESSCHECKFAILED, redact credentials, tokens, private metadata, ACL identities, and serialized payload contents.
Administrators investigating CO_E_ACCESSCHECKFAILED should preserve first-occurrence evidence before restarting COM servers, repairing packages, editing DCOM policy, or replacing serialized access data. Define who owns retry, cancellation, cleanup, policy changes, package repair, and user-facing messaging for CO_E_ACCESSCHECKFAILED.
References
- Microsoft: IAccessControl — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: IAccessControl::IsAccessAllowed — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: AccessCheck — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: LookupAccountSidW — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: LookupAccountNameW — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: access control lists — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: canonical ACE order — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED. - Microsoft: HRESULT values — official Microsoft documentation relevant to
CO_E_ACCESSCHECKFAILED.
Looking for a different code? Search another status or error code.