python1.5.2 + nt services + COM
Geoff Talvola
gtalvola at nameconnector.com
Fri Nov 9 14:49:02 EST 2001
At 02:36 PM 11/9/01 -0500, Geoff Talvola wrote:
>That's probably the reason it doesn't work. See Appendix D of Python
>Programming on Win32 for a good explanation of threading issues with
>COM. Or if you don't have the book, the short version is, try calling:
>
> pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED)
>
>at the beginning of the DoRun method (or if you'd prefer
>apartment-threading instead of free-threading, call
>pythoncom.CoInitialize() instead). Also, you should call
>
> pythoncom.CoUninitialize()
>
>at the end of the DoRun method.
Oops. I meant SvcDoRun, not DoRun.
--
- Geoff Talvola
gtalvola at NameConnector.com
More information about the Python-list
mailing list