From c21ba6f16d687644b9d0341629726baf07c6aa5f Mon Sep 17 00:00:00 2001 From: Jun Komoda <45822440+junkmd@users.noreply.github.com> Date: Mon, 27 May 2024 13:11:30 +0000 Subject: [PATCH] update --- comtypes/test/test_dispifc_records.py | 9 +++++---- source/OutProcSrv/SERVER.IDL | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/comtypes/test/test_dispifc_records.py b/comtypes/test/test_dispifc_records.py index 27ca9708b..0bad217c6 100644 --- a/comtypes/test/test_dispifc_records.py +++ b/comtypes/test/test_dispifc_records.py @@ -6,11 +6,10 @@ from comtypes.client import CreateObject, GetModule from ctypes import byref, pointer -ComtypesTestLib_GUID = "07D2AEE5-1DF8-4D2C-953A-554ADFD25F99" -ProgID = "ComtypesTest.COM.Server" +ComtypesTestLib_GUID = "{07D2AEE5-1DF8-4D2C-953A-554ADFD25F99}" try: - GetModule([f"{{{ComtypesTestLib_GUID}}}", 1, 0, 0]) + GetModule([ComtypesTestLib_GUID, 1, 0, 0]) import comtypes.gen.ComtypesTestLib as ComtypesTestLib IMPORT_FAILED = False @@ -27,7 +26,9 @@ class Test(unittest.TestCase): def _create_dispifc(self) -> "ComtypesTestLib.IComtypesTest": # Explicitely ask for the dispinterface of the component. return CreateObject( - ProgID, clsctx=CLSCTX_LOCAL_SERVER, interface=ComtypesTestLib.IComtypesTest + ComtypesTestLib.IPersist_GetClassID(), + clsctx=CLSCTX_LOCAL_SERVER, + interface=ComtypesTestLib.IComtypesTest, ) def test_byref(self): diff --git a/source/OutProcSrv/SERVER.IDL b/source/OutProcSrv/SERVER.IDL index c01fa6068..24fa5fe91 100644 --- a/source/OutProcSrv/SERVER.IDL +++ b/source/OutProcSrv/SERVER.IDL @@ -58,11 +58,11 @@ library ComtypesTestLib // Component [ uuid(06571915-2431-4CA3-9C01-53002B060DAB), - helpstring("Component Class") + helpstring("Component Class.") ] coclass Component { - [default] interface IDualComtypesTest ; + interface IDualComtypesTest ; dispinterface IComtypesTest ; } ; } ;