From fc5630ac262d113a3f9e23a886761f53a42b4f71 Mon Sep 17 00:00:00 2001 From: moi15moi Date: Sat, 11 Jan 2025 22:07:11 -0500 Subject: [PATCH] [test\test_comobject.py] Use WinDLL instead of oledll Partially fix #735 --- comtypes/test/test_comobject.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comtypes/test/test_comobject.py b/comtypes/test/test_comobject.py index cfd9ae76..87b048ec 100644 --- a/comtypes/test/test_comobject.py +++ b/comtypes/test/test_comobject.py @@ -3,9 +3,9 @@ from ctypes import POINTER, byref, pointer from unittest import mock -import comtypes import comtypes.client -from comtypes import COMObject, IUnknown, hresult +from comtypes import CLSCTX_SERVER, COMObject, IUnknown, hresult +from comtypes._post_coinit.misc import _CoCreateInstance from comtypes.automation import IDispatch comtypes.client.GetModule("UIAutomationCore.dll") @@ -54,10 +54,10 @@ def test_e_no_interface(self): def test_valid_pointer(self): ptr = ctypes.c_void_p() - ctypes.oledll.ole32.CoCreateInstance( + _CoCreateInstance( byref(scrrun.Dictionary._reg_clsid_), None, - comtypes.CLSCTX_SERVER, + CLSCTX_SERVER, byref(scrrun.IDictionary._iid_), byref(ptr), )