From 5cfc7120f84d9aff0b783d4a691c00c433d42b9b Mon Sep 17 00:00:00 2001 From: moi15moi Date: Sat, 25 Jan 2025 10:13:13 -0500 Subject: [PATCH] [automation.py] Add restype for OleDLL function To be consistent with how we declare ctypes function --- comtypes/automation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comtypes/automation.py b/comtypes/automation.py index 3e7178f6..7e6203f4 100644 --- a/comtypes/automation.py +++ b/comtypes/automation.py @@ -585,15 +585,19 @@ def ChangeType(self, typecode): _VariantChangeType = _oleaut32.VariantChangeType _VariantChangeType.argtypes = (POINTER(VARIANT), POINTER(VARIANT), c_ushort, VARTYPE) +_VariantChangeType.restype = HRESULT _VariantClear = _oleaut32.VariantClear _VariantClear.argtypes = (POINTER(VARIANT),) +_VariantClear.restype = HRESULT _VariantCopy = _oleaut32.VariantCopy _VariantCopy.argtypes = POINTER(VARIANT), POINTER(VARIANT) +_VariantCopy.restype = HRESULT _VariantCopyInd = _oleaut32.VariantCopyInd _VariantCopyInd.argtypes = POINTER(VARIANT), POINTER(VARIANT) +_VariantCopyInd.restype = HRESULT # some commonly used VARIANT instances VARIANT.null = VARIANT(None)