What does HRESULT 0xC7FF0005 (hrAlreadyOpen) mean?

 
Previous Next
hrRestoreInProgress hrInvalidRecips

hrAlreadyOpen

What this return value changes

hrAlreadyOpen means the backup context already has a file open when another file-open operation is attempted.

The stored value is 0xC7FF0005 (facility-specific HRESULT). The legacy symbolic name comes from the Windows Directory Service backup/restore message header.

The first useful distinction is that the legacy context permits one current file; the result does not mean another process has the file open at the operating-system layer. Start by recording the current filename, requested filename, HBC owner, and whether DsBackupClose was reached on every prior branch.

Objects and state involved

Diagnostic layerthe legacy Ntdsbcli HBC context and exact API call contract
Relevant API surfaceDsBackupPrepare/OpenFile/Read/Close/End and DsRestorePrepare/Register/Complete/End
Code-specific conditionthe backup context already has a file open when another file-open operation is attempted
Narrow corrective directionclose the current backup file and serialize file iteration within the context

Beginning with Windows Vista, Microsoft directs new implementations to VSS instead of these legacy functions. The HBC state advances across calls and must be released even when a later step fails.

Evidence worth preserving

  • Code-specific observation: record the current filename, requested filename, HBC owner, and whether DsBackupClose was reached on every prior branch.

How to distinguish nearby results

It specifically means that the legacy context permits one current file; the result does not mean another process has the file open at the operating-system layer. Related values below can appear in the same workflow but require a different response:

hrInvalidHandlethe HBC context or current-file state is invalid for the requested backup/restore operation
hrNyithe selected legacy Directory Service backup or restore entry point is present but that operation is not implemented
hrErrorthe Directory Service backup layer returned an internal failure without a more specific facility code

A safe response sequence

  1. Record it, 0xC7FF0005, the API name, the current phase, and all live context or file owners.
  2. Verify the condition by recording the current filename, requested filename, HBC owner, and whether DsBackupClose was reached on every prior branch.
  3. Apply only the targeted fix: close the current backup file and serialize file iteration within the context.

Actions that can make diagnosis worse

  • Do not continue after an invalid context or undefined output.
  • Do not reuse an HBC after end, abort, or a fatal sequence error.

Technical references


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