| Previous | Next |
| WINCODEC_ERR_REQUESTONLYVALIDATMETADATAROOT | WINCODEC_ERR_WIN32ERROR |
WINCODEC_ERR_INVALIDQUERYCHARACTER
The query failed during lexical parsing
WINCODEC_ERR_INVALIDQUERYCHARACTER identifies a character-level error in a WIC metadata query. The language uses slash-delimited path expressions, schema identifiers, indices, and special notation for metadata values. Characters that are ordinary in a property name can require escaping or a schema-based expression when embedded in a query path.
This status can be diagnosed before opening a different image because the expression itself is invalid. Preserve the original Unicode string and code points in logs; lossy conversion, doubled escaping in JSON or C literals, and concatenating an untrusted tag name directly into the path can all produce a query different from the one visible in source code.
Parser-focused checks
- Log the final runtime query string rather than only its source-code literal.
- Compare separators, indices, braces, and escaping with the metadata query grammar.
- Use known schema paths instead of interpolating arbitrary metadata names.
- Test the expression independently against a minimal image containing the intended metadata block.
References
- Microsoft: WIC metadata query grammar
- Microsoft: valid native-format query examples
- Microsoft: using metadata query readers and writers
Looking for a different code? Search another status or error code.