Description
Assigning 0x80020004
to VARIANT.missing
may not be appropriate.
comtypes/comtypes/automation.py
Lines 551 to 556 in 6c1788a
comtypes/comtypes/automation.py
Lines 551 to 553 in 2e94dbc
The line is intended to assign DISP_E_PARAMNOTFOUND
to a VARIANT
field to create an instance for missing parameters.
0x80020004
is evaluated as an unsigned 32-bit hexadecimal integer in Python, so it is 2147549188
, thus it does not match DISP_E_PARAMNOTFOUND
(-2147352572
).
Since neither -2147352572
nor 2147549188
has caused any errors or behavioral differences in VARIANT
, assigning VT_ERROR
to the vt
field might be the more crucial aspect.
Regardless, this part is highly non-obvious, and this is confusing.