win32com, COM, MediaPlayer
Markus von Ehr
vonehr at ira.uka.de
Wed Jan 3 04:20:21 EST 2001
Hi,
I am new to OLE and COM and try to play Soundfiles with the
MediaPlayer.
The MediaPlayer doesn't appear and when I try the Play command,
I receive:
File "c:\Programme\Python\win32com\client\dynamic.py", line 207, in
_ApplyTypes_
result = apply(self._oleobj_.invokeTypes, (dispid, LCID, wFlags,
retType, argTypes) + args)
pywintypes.com_error: (-21468283, 'CTL_E_ILLEGALFUNCTIONCALL', (0, None,
None, None, 0, -2146828283), None)
Does anybody know why the Player doesn't appear and why the Play
function doesn't work? (I tried w.Play=1 but that doesn't work neither)
My Code looks like this:
# Test dynamic policy
import win32com
import pythoncom
import win32com.client
w=win32com.client.Dispatch("MediaPlayer.MediaPlayer.1")
w.AutoStart=1
w.Open("c:\Programme\Python\ex1.wav")
#w.Play()
Thanks for any comments,
Markus
More information about the Python-list
mailing list