[python-win32] Using COM Event. A problem
Tim Roberts
timr at probo.com
Wed Dec 6 18:25:18 EST 2017
NIcola Montecchiari wrote:
>
> I am trying to create a call back for som events generated by a COM
> server that I connect.
> Looking at some posts apparently related to the same topic, I wrote
> this sample code to test:
>
> import win32com.client as com
> from win32com.client import gencache
> ...
> mod = gencache.EnsureModule('{B4955EC7-F7F2-11D2-AA9C-444553540000}',
> 0, 1, 0)
> ob = mod.Application()
> objCybio = com.DispatchWithEvents(ob, Eventi)
>
> When I run this code, it starts the connection, but soon after it is
> stopped with the following error:
Do you get the same result if you replace those three lines with this?
objCybio = win32con.client.DispatchWithEvents("Maxim.Application",
Eventi)
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list