win32com: passing object to threads
Markus von Ehr
vonehr at ira.uka.de
Thu Feb 1 14:47:57 CET 2001
I play a mp3 File with MediaPlayer using COM like this:
(Globals. are my global variables)
Globals.doc = Globals.ie.Document
Globals.mp = Globals.doc.body.children("MediaPlayer1").object
Globals.mp.FileName = "MySoundFile.mp3"
In another thread I want to set the New SoundFile:
Globals.mp.FileName = "null.wav"
and I have the error:
Pythoncomerror, (-2147221008, 'CoInitialize hasn't been called', None,
I know that I have to use the: pythoncom.CoInitialize() and
pythoncom.CoUninitialize() in a way, but don't know why.
Can anybody help me?
Thanks a lot for any answer,
More information about the Python-list