What does HRESULT 0x80042579 (VDS_E_FLAG_ALREADY_SET) mean?

 
Previous Next
VDS_E_VOLUME_HIDDEN VDS_E_DISTINCT_VOLUME

VDS_E_FLAG_ALREADY_SET

VDS_E_FLAG_ALREADY_SET is specific to temporary volume flags managed with bRevertOnClose=TRUE. VDS tracks those flags for the lifetime of the interface context so that they can be restored automatically when the caller closes it.

Balance temporary flag ownership

  • Read current volume flags before setting hidden or read-only state.
  • Reuse the existing owner or clear the exact temporary flag combination before setting it again.
  • Keep interface lifetime and cleanup paths deterministic so revert-on-close is not triggered unexpectedly.

This is different from a permanent flag already having the requested value. Revert-on-close maintains ownership state and requires matching combinations when clearing. Do not resolve the error by opening multiple volume objects that compete to manage the same temporary flags.

SetFlags · IVdsVolume · MS-VDS error codes


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