-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
In C#, as a guideline, events are exposed by an IDispatch interface for late-binding only, by using the attribute [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)].
It seems like there's no way to sink those events, a code like follows:
class IEvents():
def IEvents_OnResult(self, this, result):
print(f"Event! {result}")
from comtypes.client import GetEvents
sink = IEvents()
connection = GetEvents(obj, sink)
will cause the error _ctypes.COMError: (-2147467263, 'Not implemented', ('The method or operation is not implemented.', 'mscorlib', None, 0, None))
Is there a way to handle this use case?
Thanks
Metadata
Metadata
Assignees
Labels
No labels