What does NTSTATUS 0xC0000232 (STATUS_INVALID_VARIANT) mean?

 
Previous Next
STATUS_MARSHALL_OVERFLOW STATUS_DOMAIN_CONTROLLER_NOT_FOUND

STATUS_INVALID_VARIANT

Validate the type tag together with the union member and ownership rules

STATUS_INVALID_VARIANT concerns a variant structure whose tagged value is not valid. Windows variant types are discriminated unions: the vt or VARTYPE tag determines which union member, pointer, counted array, or nested value is meaningful. A payload that looks like a valid pointer is still invalid if the type tag says the union contains an integer, and a vector tag requires a count/pointer representation appropriate for that element type.

The PROPVARIANT documentation makes this relationship explicit: the value-type tag and value are the significant members, while serialized property sets support defined type sets and versioned formats. WIC metadata uses PROPVARIANT values and checks vt before interpreting members such as punkVal. This is the pattern to follow when diagnosing corrupted or hand-built variants.

Dump the raw type tag, reserved fields, and the union member expected for that tag before calling cleanup or conversion helpers. Uninitialized variants are a common hazard because cleanup functions interpret ownership from the tag. Initialize with the documented helper, set the tag only when the matching payload is ready, and clear the value with the corresponding variant routine. At process or kernel boundaries, validate counts and pointer-bearing forms before dereferencing them.

What to inspect

  • Log the numeric VARTYPE and decode all modifier bits such as vector or by-reference forms.
  • Confirm the union member and ownership model match the type tag before cleanup or conversion.
  • Initialize variant storage with the documented initializer instead of reusing uninitialized stack memory.

References


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