comtypes 1.4.6__zip → 1.4.8__zip

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. {comtypes-1.4.6 → comtypes-1.4.8}/CHANGES.txt +36 -0
  2. {comtypes-1.4.6/comtypes.egg-info → comtypes-1.4.8}/PKG-INFO +32 -38
  3. {comtypes-1.4.6 → comtypes-1.4.8}/README.md +30 -36
  4. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/__init__.py +1 -1
  5. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_comobject.py +0 -1
  6. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_memberspec.py +1 -1
  7. comtypes-1.4.8/comtypes/_meta.py +95 -0
  8. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_npsupport.py +2 -1
  9. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_post_coinit/__init__.py +1 -0
  10. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_post_coinit/bstr.py +13 -6
  11. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_post_coinit/misc.py +20 -39
  12. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_post_coinit/unknwn.py +94 -69
  13. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/automation.py +9 -15
  14. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/__init__.py +21 -31
  15. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/_code_cache.py +1 -0
  16. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/_events.py +0 -1
  17. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/_generate.py +5 -5
  18. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/lazybind.py +0 -5
  19. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/git.py +1 -0
  20. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/hints.pyi +6 -4
  21. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/persist.py +19 -3
  22. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/safearray.py +2 -6
  23. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/__init__.py +1 -0
  24. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/register.py +1 -0
  25. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/shelllink.py +90 -34
  26. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestComServer.py +1 -1
  27. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestDispServer.py +1 -1
  28. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/__init__.py +0 -1
  29. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/find_memleak.py +0 -1
  30. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_agilent.py +0 -1
  31. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_clear_cache.py +1 -0
  32. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_client.py +9 -0
  33. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_createwrappers.py +0 -2
  34. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_dispinterface.py +0 -1
  35. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_excel.py +0 -1
  36. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_inout_args.py +1 -1
  37. comtypes-1.4.8/comtypes/test/test_monikers.py +70 -0
  38. comtypes-1.4.8/comtypes/test/test_persist.py +40 -0
  39. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_server.py +6 -0
  40. comtypes-1.4.8/comtypes/test/test_shelllink.py +129 -0
  41. comtypes-1.4.8/comtypes/test/test_storage.py +127 -0
  42. comtypes-1.4.8/comtypes/test/test_stream.py +131 -0
  43. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_typeannotator.py +1 -1
  44. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_urlhistory.py +1 -0
  45. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_variant.py +0 -2
  46. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/namespaces.py +97 -27
  47. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/typeannotator.py +2 -4
  48. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/tlbparser.py +33 -32
  49. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/typedesc.py +2 -2
  50. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/typeinfo.py +42 -43
  51. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/util.py +1 -0
  52. {comtypes-1.4.6 → comtypes-1.4.8/comtypes.egg-info}/PKG-INFO +32 -38
  53. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes.egg-info/SOURCES.txt +5 -1
  54. comtypes-1.4.8/pyproject.toml +54 -0
  55. {comtypes-1.4.6 → comtypes-1.4.8}/setup.cfg +1 -1
  56. comtypes-1.4.6/comtypes/_meta.py +0 -70
  57. comtypes-1.4.6/comtypes/test/test_istream.py +0 -53
  58. comtypes-1.4.6/pyproject.toml +0 -3
  59. {comtypes-1.4.6 → comtypes-1.4.8}/LICENSE.txt +0 -0
  60. {comtypes-1.4.6 → comtypes-1.4.8}/MANIFEST.in +0 -0
  61. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/GUID.py +0 -0
  62. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_idl_stuff.py +0 -0
  63. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_py_instance_method.py +0 -0
  64. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_safearray.py +0 -0
  65. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/_tlib_version_checker.py +0 -0
  66. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/clear_cache.py +0 -0
  67. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/_constants.py +0 -0
  68. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/client/dynamic.py +0 -0
  69. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/connectionpoints.py +0 -0
  70. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/errorinfo.py +0 -0
  71. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/hresult.py +0 -0
  72. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/logutil.py +0 -0
  73. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/messageloop.py +0 -0
  74. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/patcher.py +0 -0
  75. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/automation.py +0 -0
  76. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/connectionpoints.py +0 -0
  77. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/inprocserver.py +0 -0
  78. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/localserver.py +0 -0
  79. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/server/w_getopt.py +0 -0
  80. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/stream.py +0 -0
  81. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestComServer.idl +0 -0
  82. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestComServer.tlb +0 -0
  83. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestDispServer.idl +0 -0
  84. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/TestDispServer.tlb +0 -0
  85. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/mylib.idl +0 -0
  86. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/mylib.tlb +0 -0
  87. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/mytypelib.idl +0 -0
  88. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/runtests.py +0 -0
  89. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/setup.py +0 -0
  90. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_BSTR.py +0 -0
  91. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_DISPPARAMS.py +0 -0
  92. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_GUID.py +0 -0
  93. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_QueryService.py +0 -0
  94. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_avmc.py +0 -0
  95. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_basic.py +0 -0
  96. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_casesensitivity.py +0 -0
  97. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_client_dynamic.py +0 -0
  98. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_client_regenerate_modules.py +0 -0
  99. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_collections.py +0 -0
  100. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_comserver.py +0 -0
  101. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_dict.py +0 -0
  102. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_dispifc_records.py +0 -0
  103. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_dispifc_safearrays.py +0 -0
  104. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_dyndispatch.py +0 -0
  105. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_findgendir.py +0 -0
  106. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_getactiveobj.py +0 -0
  107. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_ie.py +0 -0
  108. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_ienum.py +0 -0
  109. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_imfattributes.py +0 -0
  110. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_jscript.js +0 -0
  111. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_midl_safearray_create.py +0 -0
  112. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_msscript.py +0 -0
  113. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_npsupport.py +0 -0
  114. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_outparam.py +0 -0
  115. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_propputref.py +0 -0
  116. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_pump_events.py +0 -0
  117. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_recordinfo.py +0 -0
  118. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_safearray.py +0 -0
  119. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_sapi.py +0 -0
  120. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_showevents.py +0 -0
  121. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_subinterface.py +0 -0
  122. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_typeinfo.py +0 -0
  123. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_win32com_interop.py +0 -0
  124. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_wmi.py +0 -0
  125. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/test_word.py +0 -0
  126. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/test/urlhist.tlb +0 -0
  127. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/__init__.py +0 -0
  128. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/__init__.py +0 -0
  129. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/codegenerator.py +0 -0
  130. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/helpers.py +0 -0
  131. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/modulenamer.py +0 -0
  132. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/codegenerator/packing.py +0 -0
  133. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/tools/typedesc_base.py +0 -0
  134. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes/viewobject.py +0 -0
  135. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes.egg-info/dependency_links.txt +0 -0
  136. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes.egg-info/entry_points.txt +0 -0
  137. {comtypes-1.4.6 → comtypes-1.4.8}/comtypes.egg-info/top_level.txt +0 -0
  138. {comtypes-1.4.6 → comtypes-1.4.8}/setup.py +0 -0
@@ -1,6 +1,42 @@
1
1
  Comtypes CHANGELOG
2
2
  ==================
3
3
 
4
+ Release 1.4.8
5
+ --------------
6
+ * Remove Python 3.7 and add Python 3.13 to the CI pipelines. By @junkmd.
7
+ * Add constant definitions to ``shelllink``. By @junkmd.
8
+ * Add more tests to ``test_stream``. By @junkmd.
9
+ * Add the ``void_type`` definition to ``tlbparser``. By @junkmd.
10
+ * Modernize ``tools.tlbparser.get_tlib_filename``. By @junkmd.
11
+ * Extract the methods for parsing externals and dual interfaces from ``Parser.parse_typeinfo``. By @junkmd.
12
+ * Fix type annotations referenced by ``tlbparser``. By @junkmd.
13
+ * Modernize ``codegenerator.namespaces``. By @junkmd.
14
+ * Improve static typing for ``CoGetClassObject`` and ``GetClassObject``. By @junkmd.
15
+ * Refactor the ``__new__`` methods of ``_cominterface_meta`` and ``_coclass_meta``. By @junkmd.
16
+ * Prevent errors caused by defining members with the same name within an enum type. By @junkmd.
17
+ * Remove remaining ``__cmp__`` methods. By @newwingbird.
18
+ * Remove remaining ``from __future__ import print_function`` lines. By @newwingbird.
19
+ * Prevent ``itf`` to be an unbound variable in ``_cominterface_meta.__get_baseinterface_methodcount``. By @newwingbird.
20
+ * Modify the metaclasses to ensure compatibility with Python 3.13 and earlier versions. By @junkmd.
21
+
22
+ Release 1.4.7
23
+ --------------
24
+ * Improve ``_CArrayType`` alias import. By @junkmd.
25
+ * Rename ``_byref_type`` and ``_carg_obj`` to ``_CArgObject``. By @junkmd.
26
+ * Fix typos and make the wording more natural in ``README.md``. By @umarbutler.
27
+ * Modernize ``BSTR`` definition. By @junkmd.
28
+ * Modernize ``tagDEC`` definition. By @junkmd.
29
+ * Remove methods with mangling names in ``typeinfo``. By @junkmd.
30
+ * Rename ``test_istream`` to ``test_stream``. By @junkmd.
31
+ * Add ``test_msvidctl``. By @junkmd.
32
+ * Add ``test_storage``. By @junkmd.
33
+ * Add ``test_monikers``. By @junkmd.
34
+ * Add ``test_shelllink``. By @junkmd.
35
+ * Add ``test_persist``. By @junkmd.
36
+ * Modernize ``persist``. By @junkmd.
37
+ * Add type annotations to ``shelllink``. By @junkmd.
38
+ * Bump ``python_requires`` to ``>=3.8`` in ``setup.cfg``. By @junkmd.
39
+
4
40
  Release 1.4.6
5
41
  --------------
6
42
  * Add tests and method annotations for ``IRecordInfo``. By @junkmd.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: comtypes
3
- Version: 1.4.6
3
+ Version: 1.4.8
4
4
  Summary: Pure Python COM package
5
5
  Home-page: https://github.com/enthought/comtypes
6
6
  Download-URL: https://github.com/enthought/comtypes/releases
@@ -13,58 +13,53 @@ Classifier: Operating System :: Microsoft :: Windows
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
- Requires-Python: >=3.7
16
+ Requires-Python: >=3.8
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE.txt
19
19
 
20
20
  # comtypes
21
21
 
22
22
  ![Works on Windows only](https://img.shields.io/badge/-Windows-0078D6.svg?logo=windows&style=flat)
23
- [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
24
- [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members)
23
+ [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Python Requires](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpypi.org%2Fpypi%2Fcomtypes%2Fjson&query=info.requires_python&label=Python Requires)](https://pypi.org/project/comtypes/)
24
+ [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
25
+ [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
25
26
  [![Tidelift Subscription](https://tidelift.com/badges/package/pypi/comtypes)](https://tidelift.com/subscription/pkg/pypi-comtypes?utm_source=pypi-comtypes&utm_medium=readme)
26
27
 
27
- ## About
28
28
 
29
- `comtypes` is a lightweight `Python` [COM](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) package, based on the [`ctypes`](https://docs.python.org/library/ctypes.html) FFI library.
29
+ `comtypes` is a lightweight pure Python [COM](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) package based on the [`ctypes`](https://docs.python.org/library/ctypes.html) foreign function interface library.
30
30
 
31
- `comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure `Python`.
31
+ `comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
32
32
 
33
- This package works on Windows only.
33
+ `comtypes` requires Windows and Python 3.8 or later.
34
+ - Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
35
+ - Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
36
+ - Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
37
+ - `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
38
+ - Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
34
39
 
35
- Available on `Python` 3.7-3.12.
36
- - [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
37
- - In `Python` 3.7.6 and 3.8.1, `comtypes` would not work as reported in [GH-202](https://github.com/enthought/comtypes/issues/202).
38
- This bug has been fixed in `Python` >= 3.7.7 and >= 3.8.2.
39
- - In `Python` 3.8 and 3.9, some of `comtypes` functionalities may not work correctly as reported in [GH-212](https://github.com/enthought/comtypes/issues/212).
40
- This bug has been fixed in `Python` >= 3.10.10 and >= 3.11.2.
41
-
42
- ## Where to get it
43
-
44
- The source code is currently hosted on GitHub at:
45
- https://github.com/enthought/comtypes
46
-
47
- An installer for the latest released version is available at the [Python Package Index (PyPI)](https://pypi.org/project/comtypes).
40
+ ## Installation
48
41
 
42
+ `comtypes` is available on [PyPI](https://pypi.org/project/comtypes) and can be installed with `pip`:
49
43
  ```sh
50
44
  # PyPI
51
45
  pip install comtypes
52
46
  ```
53
47
 
54
- ## Dependencies
48
+ The source code is currently hosted [here](https://github.com/enthought/comtypes) on GitHub.
49
+
50
+ ### Dependencies
55
51
 
56
- `comtypes` requires no third-party packages to run - this is truly **pure** `Python` package.
52
+ `comtypes` is a pure Python package — it has no additional required dependencies.
57
53
 
58
- Optional features include the follows...
59
- - to process arrays as `numpy`'s `ndarray`
60
- - type hints be interpreted by `mypy` or several static type checkers
54
+ Optional functionalities can be enabled by installing:
55
+ - `numpy`, in order to process arrays as `numpy`'s `ndarray`.
56
+ - `mypy` or other static type checkers, in order to interpret type hints.
61
57
 
62
- But these third-parties are not required as a prerequisite for runtime.
58
+ None of these packages, however, are required in order to run `comtypes`.
63
59
 
64
- ## Community of the developers
60
+ ## Community
65
61
 
66
- Tracking issues, reporting bugs and contributing to the codebase and documentation are on GitHub at:
67
- https://github.com/enthought/comtypes
62
+ The [GitHub repository](https://github.com/enthought/comtypes) is used for tracking issues, reporting bugs, and contributing to the codebase and documentation.
68
63
 
69
64
  ## For Enterprise
70
65
 
@@ -77,17 +72,17 @@ This project and the maintainers of thousands of other packages are working with
77
72
  ## Frequently Asked Questions
78
73
 
79
74
  ### Q: Why does this package not support platforms other than Windows?
80
- **A:** [The Microsoft Component Object Model (COM)](https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview) is a technology that is unique to Windows and is not supported on other platforms.
75
+ **A:** The [Microsoft Component Object Model (COM)](https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview) is a technology that is unique to Windows and is not supported on other platforms.
81
76
 
82
77
  [The phrase _"COM is a platform-independent"_ in the MS documentation](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) means that COM maintains compatibility across different versions of Windows, and does NOT imply that it is supported on Linux or Mac.
83
78
 
84
- As long as COM is not supported outside of Windows, this project does not plan to port to other platforms.
79
+ For as long as COM is not supported outside of Windows, there is no plan to port `comtypes` to other platforms.
85
80
 
86
81
  ### Q: Why does `cannot import name 'COMError' from '_ctypes'` error occur when using this package on platforms other than Windows?
87
- **A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
88
- However, `COMError` and COM-related features are implemented only in Python for Windows.
82
+ **A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
83
+ However, `COMError` and COM-related features are only implemented in Python for Windows.
89
84
 
90
- In cross-platform software development, care must be taken to ensure that codebase dependent on `comtypes` does not execute in environments other than Windows.
85
+ In cross-platform software development, care must be taken to ensure that codebases that depend on `comtypes` do not execute in environments other than Windows.
91
86
 
92
87
  ### Q: Despite a script that depends on `comtypes` having run successfully before, a error (`ImportError`, `NameError`, or `SyntaxError`) is raised now, and the same error occurs again and again.
93
88
 
@@ -102,7 +97,6 @@ After deleting these partial modules and running the script again, `comtypes.cli
102
97
 
103
98
  However, if the script implementation does not use `comtypes.client.GetModule` or processes generated files, it may not be a solution.
104
99
 
105
- ## Documentation:
100
+ ## Documentation
106
101
 
107
- The documentation is currently hosted on pythonhosted at:
108
- https://pythonhosted.org/comtypes
102
+ The documentation is currently hosted [here](https://pythonhosted.org/comtypes) on PythonHosted.
@@ -1,51 +1,46 @@
1
1
  # comtypes
2
2
 
3
3
  ![Works on Windows only](https://img.shields.io/badge/-Windows-0078D6.svg?logo=windows&style=flat)
4
- [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
5
- [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members)
4
+ [![PyPI version](https://badge.fury.io/py/comtypes.svg)](https://pypi.org/project/comtypes/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Python Requires](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fpypi.org%2Fpypi%2Fcomtypes%2Fjson&query=info.requires_python&label=Python&nbsp;Requires)](https://pypi.org/project/comtypes/)
5
+ [![PyPI - License](https://img.shields.io/pypi/l/comtypes)](https://pypi.org/project/comtypes/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/comtypes)](https://pypi.org/project/comtypes/)
6
+ [![GitHub Repo stars](https://img.shields.io/github/stars/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/stargazers) [![GitHub forks](https://img.shields.io/github/forks/enthought/comtypes?style=social)](https://github.com/enthought/comtypes/network/members) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
6
7
  [![Tidelift Subscription](https://tidelift.com/badges/package/pypi/comtypes)](https://tidelift.com/subscription/pkg/pypi-comtypes?utm_source=pypi-comtypes&utm_medium=readme)
7
8
 
8
- ## About
9
9
 
10
- `comtypes` is a lightweight `Python` [COM](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) package, based on the [`ctypes`](https://docs.python.org/library/ctypes.html) FFI library.
10
+ `comtypes` is a lightweight pure Python [COM](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) package based on the [`ctypes`](https://docs.python.org/library/ctypes.html) foreign function interface library.
11
11
 
12
- `comtypes` allows to define, call, and implement custom and dispatch-based COM interfaces in pure `Python`.
12
+ `comtypes` allows you to define, call, and implement custom and dispatch-based COM interfaces in pure Python.
13
13
 
14
- This package works on Windows only.
14
+ `comtypes` requires Windows and Python 3.8 or later.
15
+ - Version <= [1.4.7](https://pypi.org/project/comtypes/1.4.7/) does not work with Python 3.13 as reported in [GH-618](https://github.com/enthought/comtypes/issues/618). Version [1.4.8](https://pypi.org/project/comtypes/1.4.8/) can work with Python 3.13.
16
+ - Version [1.4.6](https://pypi.org/project/comtypes/1.4.6/) is the last version to support Python 3.7.
17
+ - Version [1.2.1](https://pypi.org/project/comtypes/1.2.1/) is the last version to support Python 2.7 and 3.3–3.6.
18
+ - `comtypes` does not work with Python 3.8.1 as reported in [GH-202](https://github.com/enthought/comtypes/issues/202). This bug has been fixed in Python >= 3.8.2.
19
+ - Certain `comtypes` functions may not work correctly in Python 3.8 and 3.9 as reported in [GH-212](https://github.com/enthought/comtypes/issues/212). This bug has been fixed in Python >= 3.10.10 and >= 3.11.2.
15
20
 
16
- Available on `Python` 3.7-3.12.
17
- - [`comtypes==1.2.1`](https://pypi.org/project/comtypes/1.2.1/) is the last version supporting `Python` 2.7 and 3.3-3.6.
18
- - In `Python` 3.7.6 and 3.8.1, `comtypes` would not work as reported in [GH-202](https://github.com/enthought/comtypes/issues/202).
19
- This bug has been fixed in `Python` >= 3.7.7 and >= 3.8.2.
20
- - In `Python` 3.8 and 3.9, some of `comtypes` functionalities may not work correctly as reported in [GH-212](https://github.com/enthought/comtypes/issues/212).
21
- This bug has been fixed in `Python` >= 3.10.10 and >= 3.11.2.
22
-
23
- ## Where to get it
24
-
25
- The source code is currently hosted on GitHub at:
26
- https://github.com/enthought/comtypes
27
-
28
- An installer for the latest released version is available at the [Python Package Index (PyPI)](https://pypi.org/project/comtypes).
21
+ ## Installation
29
22
 
23
+ `comtypes` is available on [PyPI](https://pypi.org/project/comtypes) and can be installed with `pip`:
30
24
  ```sh
31
25
  # PyPI
32
26
  pip install comtypes
33
27
  ```
34
28
 
35
- ## Dependencies
29
+ The source code is currently hosted [here](https://github.com/enthought/comtypes) on GitHub.
30
+
31
+ ### Dependencies
36
32
 
37
- `comtypes` requires no third-party packages to run - this is truly **pure** `Python` package.
33
+ `comtypes` is a pure Python package — it has no additional required dependencies.
38
34
 
39
- Optional features include the follows...
40
- - to process arrays as `numpy`'s `ndarray`
41
- - type hints be interpreted by `mypy` or several static type checkers
35
+ Optional functionalities can be enabled by installing:
36
+ - `numpy`, in order to process arrays as `numpy`'s `ndarray`.
37
+ - `mypy` or other static type checkers, in order to interpret type hints.
42
38
 
43
- But these third-parties are not required as a prerequisite for runtime.
39
+ None of these packages, however, are required in order to run `comtypes`.
44
40
 
45
- ## Community of the developers
41
+ ## Community
46
42
 
47
- Tracking issues, reporting bugs and contributing to the codebase and documentation are on GitHub at:
48
- https://github.com/enthought/comtypes
43
+ The [GitHub repository](https://github.com/enthought/comtypes) is used for tracking issues, reporting bugs, and contributing to the codebase and documentation.
49
44
 
50
45
  ## For Enterprise
51
46
 
@@ -58,17 +53,17 @@ This project and the maintainers of thousands of other packages are working with
58
53
  ## Frequently Asked Questions
59
54
 
60
55
  ### Q: Why does this package not support platforms other than Windows?
61
- **A:** [The Microsoft Component Object Model (COM)](https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview) is a technology that is unique to Windows and is not supported on other platforms.
56
+ **A:** The [Microsoft Component Object Model (COM)](https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview) is a technology that is unique to Windows and is not supported on other platforms.
62
57
 
63
58
  [The phrase _"COM is a platform-independent"_ in the MS documentation](https://learn.microsoft.com/en-us/windows/win32/com/component-object-model--com--portal) means that COM maintains compatibility across different versions of Windows, and does NOT imply that it is supported on Linux or Mac.
64
59
 
65
- As long as COM is not supported outside of Windows, this project does not plan to port to other platforms.
60
+ For as long as COM is not supported outside of Windows, there is no plan to port `comtypes` to other platforms.
66
61
 
67
62
  ### Q: Why does `cannot import name 'COMError' from '_ctypes'` error occur when using this package on platforms other than Windows?
68
- **A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
69
- However, `COMError` and COM-related features are implemented only in Python for Windows.
63
+ **A:** The [`_ctypes`](https://github.com/python/cpython/blob/main/Modules/_ctypes/_ctypes.c) is part of the internal implementation of the [`ctypes`](https://github.com/python/cpython/blob/main/Lib/ctypes/) standard library that exists for Python on all platforms.
64
+ However, `COMError` and COM-related features are only implemented in Python for Windows.
70
65
 
71
- In cross-platform software development, care must be taken to ensure that codebase dependent on `comtypes` does not execute in environments other than Windows.
66
+ In cross-platform software development, care must be taken to ensure that codebases that depend on `comtypes` do not execute in environments other than Windows.
72
67
 
73
68
  ### Q: Despite a script that depends on `comtypes` having run successfully before, a error (`ImportError`, `NameError`, or `SyntaxError`) is raised now, and the same error occurs again and again.
74
69
 
@@ -83,7 +78,6 @@ After deleting these partial modules and running the script again, `comtypes.cli
83
78
 
84
79
  However, if the script implementation does not use `comtypes.client.GetModule` or processes generated files, it may not be a solution.
85
80
 
86
- ## Documentation:
81
+ ## Documentation
87
82
 
88
- The documentation is currently hosted on pythonhosted at:
89
- https://pythonhosted.org/comtypes
83
+ The documentation is currently hosted [here](https://pythonhosted.org/comtypes) on PythonHosted.
@@ -1,5 +1,5 @@
1
1
  # comtypes version numbers follow semver (http://semver.org/) and PEP 440
2
- __version__ = "1.4.6"
2
+ __version__ = "1.4.8"
3
3
 
4
4
  try:
5
5
  from _ctypes import COMError # noqa
@@ -349,7 +349,6 @@ else:
349
349
 
350
350
 
351
351
  class LocalServer(object):
352
-
353
352
  _queue = None
354
353
 
355
354
  def run(self, classobjects):
@@ -43,7 +43,7 @@ def _unpack_argspec(
43
43
 
44
44
 
45
45
  def _resolve_argspec(
46
- items: Tuple[_ArgSpecElmType, ...]
46
+ items: Tuple[_ArgSpecElmType, ...],
47
47
  ) -> Tuple[Tuple[_ParamFlagType, ...], Tuple[Type[_CData], ...]]:
48
48
  """Unpacks and converts from argspec to paramflags and argtypes.
49
49
 
@@ -0,0 +1,95 @@
1
+ # comtypes._meta helper module
2
+ from ctypes import POINTER, c_void_p, cast
3
+ import comtypes
4
+
5
+ ################################################################
6
+ # metaclass for CoClass (in comtypes/__init__.py)
7
+
8
+
9
+ def _wrap_coclass(self):
10
+ # We are an IUnknown pointer, represented as a c_void_p instance,
11
+ # but we really want this interface:
12
+ itf = self._com_interfaces_[0]
13
+ punk = cast(self, POINTER(itf))
14
+ result = punk.QueryInterface(itf)
15
+ result.__dict__["__clsid"] = str(self._reg_clsid_)
16
+ return result
17
+
18
+
19
+ def _coclass_from_param(cls, obj):
20
+ if isinstance(obj, (cls._com_interfaces_[0], cls)):
21
+ return obj
22
+ raise TypeError(obj)
23
+
24
+
25
+ #
26
+ # The mro() of a POINTER(App) type, where class App is a subclass of CoClass:
27
+ #
28
+ # POINTER(App)
29
+ # App
30
+ # CoClass
31
+ # c_void_p
32
+ # _SimpleCData
33
+ # _CData
34
+ # object
35
+
36
+
37
+ class _coclass_meta(type):
38
+ # metaclass for CoClass
39
+ #
40
+ # When a CoClass subclass is created, create a POINTER(...) type
41
+ # for that class, with bases <coclass> and c_void_p. Also, the
42
+ # POINTER(...) type gets a __ctypes_from_outparam__ method which
43
+ # will QueryInterface for the default interface: the first one on
44
+ # the coclass' _com_interfaces_ list.
45
+ def __new__(cls, name, bases, namespace):
46
+ self = type.__new__(cls, name, bases, namespace)
47
+ if bases == (object,):
48
+ # HACK: Could this conditional branch be removed since it is never reached?
49
+ # Since definition is `class CoClass(COMObject, metaclass=_coclass_meta)`,
50
+ # the `bases` parameter passed to the `_coclass_meta.__new__` would be
51
+ # `(COMObject,)`.
52
+ # Moreover, since the `COMObject` derives from `object` and does not specify
53
+ # a metaclass, `(object,)` will not be passed as the `bases` parameter
54
+ # to the `_coclass_meta.__new__`.
55
+ # The reason for this implementation might be a remnant of the differences
56
+ # in how metaclasses work between Python 3.x and Python 2.x.
57
+ # If there are no problems with the versions of Python that `comtypes`
58
+ # supports, this removal could make the process flow easier to understand.
59
+ return self
60
+ # XXX We should insist that a _reg_clsid_ is present.
61
+ if "_reg_clsid_" in namespace:
62
+ clsid = namespace["_reg_clsid_"]
63
+ comtypes.com_coclass_registry[str(clsid)] = self
64
+
65
+ # `_coclass_pointer_meta` is a subclass inherited from `_coclass_meta`.
66
+ # In other words, when the `__new__` method of this metaclass is called, an
67
+ # instance of `_coclass_pointer_meta` might be created and assigned to `self`.
68
+ if isinstance(self, _coclass_pointer_meta):
69
+ # `self` is the `_coclass_pointer_meta` type or a `POINTER(coclass)` type.
70
+ # Prevent creating/registering a pointer to a pointer (to a pointer...),
71
+ # or specifying the metaclass type instance in the `bases` parameter when
72
+ # instantiating it, which would lead to infinite recursion.
73
+ # Depending on a version or revision of Python, this may be essential.
74
+ return self
75
+
76
+ PTR = _coclass_pointer_meta(
77
+ f"POINTER({self.__name__})",
78
+ (self, c_void_p),
79
+ {
80
+ "__ctypes_from_outparam__": _wrap_coclass,
81
+ "from_param": classmethod(_coclass_from_param),
82
+ },
83
+ )
84
+ from ctypes import _pointer_type_cache # type: ignore
85
+
86
+ _pointer_type_cache[self] = PTR
87
+
88
+ return self
89
+
90
+
91
+ # will not work if we change the order of the two base classes!
92
+ class _coclass_pointer_meta(type(c_void_p), _coclass_meta):
93
+ # metaclass for CoClass pointer
94
+
95
+ pass # no functionality, but needed to avoid a metaclass conflict
@@ -1,4 +1,5 @@
1
- """ Consolidation of numpy support utilities. """
1
+ """Consolidation of numpy support utilities."""
2
+
2
3
  import sys
3
4
 
4
5
  is_64bits = sys.maxsize > 2**32
@@ -12,4 +12,5 @@ This subpackage is called simultaneously with the initialization of `comtypes`.
12
12
  So it is necessary to maintain minimal settings to keep the lightweight action
13
13
  when the package is initialized.
14
14
  """
15
+
15
16
  from comtypes._post_coinit.unknwn import _shutdown # noqa
@@ -1,26 +1,33 @@
1
1
  from ctypes import _SimpleCData, windll
2
+ from typing import Any, Callable, TYPE_CHECKING
3
+
4
+ if TYPE_CHECKING:
5
+ from comtypes import hints # type: ignore
2
6
 
3
7
 
4
8
  class BSTR(_SimpleCData):
5
- "The windows BSTR data type"
9
+ """The windows BSTR data type"""
10
+
6
11
  _type_ = "X"
7
12
  _needsfree = False
8
13
 
9
- def __repr__(self):
10
- return "%s(%r)" % (self.__class__.__name__, self.value)
14
+ def __repr__(self) -> str:
15
+ return f"{self.__class__.__name__}({self.value!r})"
11
16
 
12
- def __ctypes_from_outparam__(self):
17
+ def __ctypes_from_outparam__(self) -> Any:
13
18
  self._needsfree = True
14
19
  return self.value
15
20
 
16
- def __del__(self, _free=windll.oleaut32.SysFreeString):
21
+ def __del__(
22
+ self, _free: Callable[["BSTR"], Any] = windll.oleaut32.SysFreeString
23
+ ) -> None:
17
24
  # Free the string if self owns the memory
18
25
  # or if instructed by __ctypes_from_outparam__.
19
26
  if self._b_base_ is None or self._needsfree:
20
27
  _free(self)
21
28
 
22
29
  @classmethod
23
- def from_param(cls, value):
30
+ def from_param(cls, value: Any) -> "hints.Self":
24
31
  """Convert into a foreign function call parameter."""
25
32
  if isinstance(value, cls):
26
33
  return value
@@ -88,15 +88,9 @@ class IServiceProvider(IUnknown):
88
88
 
89
89
 
90
90
  @overload
91
- def CoGetObject(displayname: str, interface: None) -> IUnknown:
92
- ...
93
-
94
-
91
+ def CoGetObject(displayname: str, interface: None) -> IUnknown: ...
95
92
  @overload
96
- def CoGetObject(displayname: str, interface: Type[_T_IUnknown]) -> _T_IUnknown:
97
- ...
98
-
99
-
93
+ def CoGetObject(displayname: str, interface: Type[_T_IUnknown]) -> _T_IUnknown: ...
100
94
  def CoGetObject(displayname: str, interface: Optional[Type[IUnknown]]) -> IUnknown:
101
95
  """Convert a displayname to a moniker, then bind and return the object
102
96
  identified by the moniker."""
@@ -117,20 +111,14 @@ def CoCreateInstance(
117
111
  interface: None = None,
118
112
  clsctx: Optional[int] = None,
119
113
  punkouter: Optional[_pUnkOuter] = None,
120
- ) -> IUnknown:
121
- ...
122
-
123
-
114
+ ) -> IUnknown: ...
124
115
  @overload
125
116
  def CoCreateInstance(
126
117
  clsid: GUID,
127
118
  interface: Type[_T_IUnknown],
128
119
  clsctx: Optional[int] = None,
129
120
  punkouter: Optional[_pUnkOuter] = None,
130
- ) -> _T_IUnknown:
131
- ...
132
-
133
-
121
+ ) -> _T_IUnknown: ...
134
122
  def CoCreateInstance(
135
123
  clsid: GUID,
136
124
  interface: Optional[Type[IUnknown]] = None,
@@ -153,14 +141,19 @@ def CoCreateInstance(
153
141
  if TYPE_CHECKING:
154
142
 
155
143
  @overload
156
- def CoGetClassObject(clsid, clsctx=None, pServerInfo=None, interface=None):
157
- # type: (GUID, Optional[int], Optional[COSERVERINFO], None) -> hints.IClassFactory
158
- pass
159
-
144
+ def CoGetClassObject(
145
+ clsid: GUID,
146
+ clsctx: Optional[int] = None,
147
+ pServerInfo: "Optional[COSERVERINFO]" = None,
148
+ interface: None = None,
149
+ ) -> hints.IClassFactory: ...
160
150
  @overload
161
- def CoGetClassObject(clsid, clsctx=None, pServerInfo=None, interface=None):
162
- # type: (GUID, Optional[int], Optional[COSERVERINFO], Type[_T_IUnknown]) -> _T_IUnknown
163
- pass
151
+ def CoGetClassObject(
152
+ clsid: GUID,
153
+ clsctx: Optional[int] = None,
154
+ pServerInfo: "Optional[COSERVERINFO]" = None,
155
+ interface: Type[_T_IUnknown] = hints.IClassFactory,
156
+ ) -> _T_IUnknown: ...
164
157
 
165
158
 
166
159
  def CoGetClassObject(clsid, clsctx=None, pServerInfo=None, interface=None):
@@ -177,15 +170,9 @@ def CoGetClassObject(clsid, clsctx=None, pServerInfo=None, interface=None):
177
170
 
178
171
 
179
172
  @overload
180
- def GetActiveObject(clsid: GUID, interface: None = None) -> IUnknown:
181
- ...
182
-
183
-
173
+ def GetActiveObject(clsid: GUID, interface: None = None) -> IUnknown: ...
184
174
  @overload
185
- def GetActiveObject(clsid: GUID, interface: Type[_T_IUnknown]) -> _T_IUnknown:
186
- ...
187
-
188
-
175
+ def GetActiveObject(clsid: GUID, interface: Type[_T_IUnknown]) -> _T_IUnknown: ...
189
176
  def GetActiveObject(
190
177
  clsid: GUID, interface: Optional[Type[IUnknown]] = None
191
178
  ) -> IUnknown:
@@ -335,10 +322,7 @@ def CoCreateInstanceEx(
335
322
  clsctx: Optional[int] = None,
336
323
  machine: Optional[str] = None,
337
324
  pServerInfo: Optional[COSERVERINFO] = None,
338
- ) -> IUnknown:
339
- ...
340
-
341
-
325
+ ) -> IUnknown: ...
342
326
  @overload
343
327
  def CoCreateInstanceEx(
344
328
  clsid: GUID,
@@ -346,10 +330,7 @@ def CoCreateInstanceEx(
346
330
  clsctx: Optional[int] = None,
347
331
  machine: Optional[str] = None,
348
332
  pServerInfo: Optional[COSERVERINFO] = None,
349
- ) -> _T_IUnknown:
350
- ...
351
-
352
-
333
+ ) -> _T_IUnknown: ...
353
334
  def CoCreateInstanceEx(
354
335
  clsid: GUID,
355
336
  interface: Optional[Type[IUnknown]] = None,