Skip to content

Commit 5018525

Browse files
committed
[automation.py] Use WinDLL instead of OleDLL
Only to have a more consistent code because we always use WinDLL
1 parent bc6b5e0 commit 5018525

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

comtypes/automation.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -575,23 +575,27 @@ def ChangeType(self, typecode):
575575
VARIANT = tagVARIANT
576576
VARIANTARG = VARIANT
577577

578-
_oleaut32 = OleDLL("oleaut32")
578+
_oleaut32 = WinDLL("oleaut32")
579579

580580
_VariantChangeType = _oleaut32.VariantChangeType
581581
_VariantChangeType.argtypes = (POINTER(VARIANT), POINTER(VARIANT), c_ushort, VARTYPE)
582+
_VariantChangeType.restype = HRESULT
582583

583584
_VariantClear = _oleaut32.VariantClear
584585
_VariantClear.argtypes = (POINTER(VARIANT),)
586+
_VariantClear.restype = HRESULT
585587

586-
_SysAllocStringLen = windll.oleaut32.SysAllocStringLen
588+
_SysAllocStringLen = _oleaut32.SysAllocStringLen
587589
_SysAllocStringLen.argtypes = c_wchar_p, c_uint
588590
_SysAllocStringLen.restype = c_void_p
589591

590592
_VariantCopy = _oleaut32.VariantCopy
591593
_VariantCopy.argtypes = POINTER(VARIANT), POINTER(VARIANT)
594+
_VariantCopy.restype = HRESULT
592595

593596
_VariantCopyInd = _oleaut32.VariantCopyInd
594597
_VariantCopyInd.argtypes = POINTER(VARIANT), POINTER(VARIANT)
598+
_VariantCopyInd.restype = HRESULT
595599

596600
# some commonly used VARIANT instances
597601
VARIANT.null = VARIANT(None)

0 commit comments

Comments
 (0)