a strange problem in python multi-thread programming

WU FUHENG tmswfh at nus.edu.sg
Thu Feb 5 04:17:44 EST 2004


Today,I found a strange problem in python multi-thread programming.When I used function win32com.client.Dispatch('ADODB.Connection') in primary thread, it was OK. But when I called it in secondary-thread, it raised a exception. Then debugging and tracking the code, I found the problem was from the function pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) in . The parameters are (ADODB.Connection, None, 21, {00020400-0000-0000-C000-000000000046}). But just as I said above, this function would be ok in primaray thread mode but not work in the secondary-thread mode. Since this function is from the dll(in my computer is python23.dll), I can not see the source code and don't know how to solve this problem. Anyone can help me? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20040205/99cdcf5e/attachment.html>


More information about the Python-list mailing list