| Previous | Next |
| ERROR_CAN_NOT_COMPLETE | ERROR_UNRECOGNIZED_VOLUME |
ERROR_INVALID_FLAGS
invalid flags.
ERROR_INVALID_FLAGS means that a flags argument contains unsupported bits or a combination that the called API does not accept.
Where the result appears
- Win32 calls that accept bitwise option masks.
- version-dependent filesystem, process, networking, security, or UI features.
- language bindings that map enums to native flags.
- configuration values persisted by an older or newer product version.
Typical causes
- one or more unknown bits are set.
- two individually valid options are mutually exclusive.
- a flag is valid only with another parameter or object type.
- headers and runtime versions do not support the same option set.
What to collect
- the exact hexadecimal mask and symbolic flags the caller intended.
- API version, operating-system build, SDK/header version, and architecture.
- related parameters whose values constrain legal flag combinations.
- the code path that assembled the mask, including defaults and configuration input.
Handling and recovery
Validate masks against the documented allowed set before calling the API. Reject unknown configuration bits explicitly, and negotiate optional capabilities rather than assuming a new flag works everywhere. When falling back, remove only the unsupported feature and keep security-relevant semantics intact.
Common misinterpretation
A nonzero flags value is not inherently invalid. The defect is an unsupported bit or combination, not simply the presence of options.
References
Looking for a different code? Search another status or error code.
