win32com, COM, MediaPlayer

Roger Upole rupole at msn.com
Thu Jan 4 23:53:19 CET 2001


Try using the Windows Media Player Core instead.  This works on my system
with wmp 7.
w=win32com.client.Dispatch('{09428D37-E0B9-11D2-B147-00C04F79FAA6}')
w.launchURL('c:\\windows\\a3dspls.wav')
   hth
   Roger Upole

"Markus von Ehr" <vonehr at ira.uka.de> wrote in message
news:3A546D1F.12D9FB46 at ira.uka.de...
> The Play command still gives me the error:
>
> 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)
>
> Anybody knows why?
>
> Thanks,
>
> Markus
>
>
> *****************************************************************
>
> My Code looks like this:
>
> # Test dynamic policy
>
> import time
> 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()
>
> while 1:
>     time.sleep(1)






More information about the Python-list mailing list