Assigning 0x80020004 to VARIANT.missing may not be appropriate.
|
v.vt = VT_ERROR |
|
if sys.version_info >= (3, 0): |
|
v._.VT_I4 = 0x80020004 |
|
else: |
|
v._.VT_I4 = 0x80020004L |
|
del v |
|
v.vt = VT_ERROR |
|
v._.VT_I4 = 0x80020004 |
|
del v |
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.
Assigning
0x80020004toVARIANT.missingmay 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_PARAMNOTFOUNDto aVARIANTfield to create an instance for missing parameters.0x80020004is evaluated as an unsigned 32-bit hexadecimal integer in Python, so it is2147549188, thus it does not matchDISP_E_PARAMNOTFOUND(-2147352572).Since neither
-2147352572nor2147549188has caused any errors or behavioral differences inVARIANT, assigningVT_ERRORto thevtfield might be the more crucial aspect.Regardless, this part is highly non-obvious, and this is confusing.