What does HRESULT 0x80010118 (RPC_E_UNSECURE_CALL) mean?

 
Previous Next
RPC_E_CALL_COMPLETE RPC_E_TOO_LATE

RPC_E_UNSECURE_CALL

Impersonation was requested on an unsecured call

RPC_E_UNSECURE_CALL is HRESULT 2147549464 (0x80010118) from winerror.h. AllStat describes it as “Impersonate on unsecure calls is not supported.” In the COM/RPC call control, message filtering, apartment routing, marshaling, security negotiation, or remote object lifetime, the code identifies a specific failure boundary and should not be replaced by a generic COM exception.

Handling this result correctly requires the code-specific postcondition, not merely the fact that FAILED(hr) is true.

Where it is encountered

  • Cross-apartment or cross-process COM method invocation and activation. Record the interface, method, component version, thread, apartment, process, and correlation ID.
  • STA message filtering, reentrancy, call cancellation, timeout, or retry handling.
  • DCOM security initialization, proxy/stub marshaling, OBJREF processing, and server object lifetime.

The immediate focus for this HRESULT is a server attempt to impersonate when the COM/RPC call lacks an authentication context that supports impersonation. Keep it 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 authentication service, authentication level, impersonation level, cloaking, and client identity availability are recorded. If this condition cannot be proven for this HRESULT, stop before consuming outputs or repeating side effects.

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.

Correct handling and recovery

Configure COM security before marshaling, require an authenticated binding, or execute under server identity when the operation is explicitly safe. Never fabricate client identity.

An unchanged retry loop for this HRESULT can duplicate effects, deepen reentrancy, or hide an invalid lifetime transition.

Lifetime, retry, and cleanup rules

After it, determine whether the current object, interface pointer, call context, token, stream, metadata reader, asynchronous operation, or access-control instance remains valid. 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 this HRESULT should state the trigger, maximum attempts, cancellation owner, and reconciliation step for effects that may have completed elsewhere.

Difference from nearby HRESULTs

It means the call cannot support impersonation; CO_E_FAILEDTOIMPERSONATE means an impersonation attempt failed despite a call context.

Merging it with the neighboring HRESULT would choose the wrong retry, recreation, authorization, or cleanup path.

Practical scenario

A DCOM service receives an anonymous call and tries to open a file as the client. It rejects the operation until an authenticated binding is established.

A regression test should reproduce it, assert the raw HRESULT and all relevant outputs, then correct only the decisive condition and verify the intended success or neighboring failure result.

References


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