What does HRESULT 0xC8000772 (hrInvalidOperation) mean?

 
Previous Next
hrLogCorrupted hrAccessDenied

hrInvalidOperation

The object and state that matter

hrInvalidOperation means the engine state, object type, or call ordering makes the requested operation invalid.

This is the legacy Directory Service backup/restore HRESULT form of JET_errInvalidOperation (0xC8000772).

The key comparison is: hrIllegalOperation is commonly table/sort-specific; this code is the broader state-machine result. The first useful observation is to capture exact API, instance/session/table states, transaction depth, flags, and preceding successful calls. This evidence shows whether startup, normal operation, shutdown, or restore ordering is the actual boundary.

Minimum useful trace

  • Code-specific observation: capture exact API, instance/session/table states, transaction depth, flags, and preceding successful calls.
  • the successful or failed JetInit/JetTerm sequence and the component that owns it; associate it with this result rather than with a later generic exception.
  • all still-live sessions and child handles at the transition.
  • the first request accepted after shutdown or before initialization completed.

How to avoid a false diagnosis

hrFeatureNotAvailablean API or option is recognized but absent from the engine build or operating mode in use
hrNotInitializedan ESE call requiring a running instance was made before successful initialization
hrAlreadyInitializedinitialization-only work was attempted after the instance had already entered the running state

The ESE objects in play

Diagnostic layerESE instance state and call ordering
Typical API surfaceJetCreateInstance, JetSetSystemParameter, JetInit, JetTerm, and restore entry points
Code-specific conditionthe engine state, object type, or call ordering makes the requested operation invalid
First corrective directionreconstruct the documented call sequence and make invalid states impossible in the wrapper API

Initialization parameters are generally established before JetInit. Handles derived from an instance are not reusable after teardown.

Safe recovery sequence

  1. Freeze the failing request context and record 0xC8000772, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: capture exact API, instance/session/table states, transaction depth, flags, and preceding successful calls.
  3. Apply the targeted fix: reconstruct the documented call sequence and make invalid states impossible in the wrapper API.
  4. Before retrying the operation, reconcile instance state, admission control, and child-handle cleanup.

Actions that can hide or worsen the problem

  • Do not reuse instance-derived handles after the lifecycle transition.
  • Do not start a second initializer to work around an ordering defect.

Technical references


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