Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are there any use cases for DllCanUnloadNow and DllGetClassObject? #671

Open
junkmd opened this issue Nov 27, 2024 · 1 comment
Open

Are there any use cases for DllCanUnloadNow and DllGetClassObject? #671

junkmd opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed question Further information is requested shared_info use cases, tips and troubleshoots

Comments

@junkmd
Copy link
Collaborator

junkmd commented Nov 27, 2024

In the discussions in python/cpython#127210 and python/cpython#127369, it was noted that the Python standard library's ctypes functions ctypes.DllCanUnloadNow and ctypes.DllGetClassObject depend on functions of the same name in comtypes.server.inprocserver (DllCanUnloadNow and DllGetClassObject).

Eventually, these functions might either be redesigned to remove the dependency on comtypes or be deprecated and removed from ctypes altogether after a few years.

Users currently relying on these ctypes APIs might need to switch to using the equivalent APIs provided by comtypes.

However, I have never directly called these functions (neither in ctypes nor in comtypes), so I am not aware of the use cases or expected behaviors associated with them.

To help with adding tests and providing proper migration guidance, I encourage anyone familiar with the use cases of these APIs to share their insights by commenting on this issue.

@junkmd junkmd added question Further information is requested shared_info use cases, tips and troubleshoots help wanted Extra attention is needed labels Nov 27, 2024
@junkmd junkmd self-assigned this Nov 27, 2024
@junkmd
Copy link
Collaborator Author

junkmd commented Dec 2, 2024

@bennyrowland

As you mentioned in #565, you are using this package to create COM servers:

for making several local servers to provide plugins for another application

In that case, I think that ctypes.DllCanUnloadNow and ctypes.DllGetClassObject might be appropriately hooked as needed.

It would be helpful if you could share how the hooks for DllCanUnloadNow and DllGetClassObject have been beneficial (or not) to your project.
And please join the discussion at python/cpython#127369 if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested shared_info use cases, tips and troubleshoots
Projects
None yet
Development

No branches or pull requests

1 participant