enthought / comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Other
283 stars 96 forks source link

Determine whether a COM interface is one of the known symbols not only by its name but also by using its iid #529

Closed junkmd closed 2 months ago

junkmd commented 2 months ago

While fixing the bug reported in #524, I noticed something.

If there is an interface in the COM type library with the same name as a symbol defined in ctypes or ctypes.wintypes, the codegenerator can only identify the symbol by its name, which leads to the symbol being imported and used inappropriately.

To prevent this confusion, the codegenerator will now determine whether a COM interface is one of the known symbols not only by its name but also by using its iid.

junkmd commented 2 months ago

CIs are passed.

https://github.com/enthought/comtypes/actions/runs/8697636479 https://ci.appveyor.com/project/pywinauto/pywinauto/builds/49622407