| Previous | Next |
| WCM_E_INVALIDVALUE | WCM_E_TYPENOTSPECIFIED |
WCM_E_INVALIDVALUEFORMAT
WCM_E_INVALIDVALUEFORMAT is the failure HRESULT 0x80220006 (signed decimal -2145255418, unsigned decimal 2149711878). Its severity bit is 1, facility is 34 (FACILITY_STATE_MANAGEMENT), and the facility-specific code field is 0x0006.
AllStat records the Windows SDK description as “Value is in invalid format.”
What the HRESULT establishes
A setting value cannot be parsed in the required format. The operation reached conversion of serialized or textual configuration data into the metadata-declared type. The first branch to test is whether a number contains locale-specific separators not accepted by the schema; keep that separate from the possibility that a Boolean, GUID, date, or version uses a human-readable form different from the expected lexical form.
Processing stage
At this boundary, capture the exact source text before XML/entity decoding, then correlate it with declared WcmDataType and setting metadata. Assign ownership only after checking culture and language assumptions of the authoring tool.
Failure patterns to separate
- a number contains locale-specific separators not accepted by the schema
- a Boolean, GUID, date, or version uses a human-readable form different from the expected lexical form
- whitespace, quoting, or escaping changed while XML was generated
- a binary or encoded field was truncated or normalized by an intermediate tool
Capture these facts first
- the exact source text before XML/entity decoding
- declared WcmDataType and setting metadata
- culture and language assumptions of the authoring tool
- ISettingsResult line, column, source path, and context description
- a minimal known-good lexical example for the same setting
A safe investigation order
- preserve the original token and compare it character by character with the required format
- serialize through a type-aware writer instead of string concatenation
- test parsing before merging the value into a larger answer file
- keep locale-neutral formatting for deployment metadata
- revalidate the final emitted stream, not only the in-memory value
Recovery conditions
Correct the lexical form before retrying. Changing target state cannot make malformed text parse successfully.
Do not confuse it with adjacent codes
WCM_E_INVALIDVALUE says a parsed value violates the contract; WCM_E_INVALIDDATATYPE says the supplied or stored type is wrong. This code is specifically about representation.
Deployment example
A date value is emitted using a localized display format. The type is known, but SMI cannot parse the token expected by the schema.
Telemetry fields worth retaining
For operational telemetry, retain culture and language assumptions of the authoring tool; also record ISettingsResult line, column, source path, and context description. Preserve a redacted summary of a minimal known-good lexical example for the same setting; use a cryptographic hash when that evidence is a file, stream, or generated artifact.
Official Microsoft references.
- Microsoft: SMI error and success constants.
- Microsoft: Settings Management Infrastructure API.
- Microsoft: SMI interfaces.
- Microsoft: WcmDataType.
- Microsoft: ISettingsItem::GetDataType.
Looking for a different code? Search another status or error code.