| 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 layer | the legacy Ntdsbcli HBC context and exact API call contract |
|---|---|
| Relevant API surface | DsBackupPrepare/OpenFile/Read/Close/End and DsRestorePrepare/Register/Complete/End |
| Code-specific condition | the backup context already has a file open when another file-open operation is attempted |
| Narrow corrective direction | close 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:
hrInvalidHandle | the HBC context or current-file state is invalid for the requested backup/restore operation |
|---|---|
hrNyi | the selected legacy Directory Service backup or restore entry point is present but that operation is not implemented |
hrError | the Directory Service backup layer returned an internal failure without a more specific facility code |
A safe response sequence
- Record it,
0xC7FF0005, the API name, the current phase, and all live context or file owners. - Verify the condition by recording the current filename, requested filename, HBC owner, and whether DsBackupClose was reached on every prior branch.
- 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
- AD backup error values — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to this HRESULT.
- AD backup walkthrough
- DsRestorePrepare contract
Looking for a different code? Search another status or error code.