| Previous | Next |
| WCM_E_INVALIDVALUE | WCM_E_TYPENOTSPECIFIED |
WCM_E_INVALIDVALUEFORMAT
The Windows SDK describes the condition 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.
Official Microsoft references.
Looking for a different code? Search another status or error code.
