I am using the axwindowsMediaPlayer object to display video in winform. In particular, I want to play the playlist.
Everything works fine on my computer (win7) and works fine on another PC with winXP (end user PC).
But something happened a couple of days ago: on XP, I started getting the following schedule
Unhandled Exception:
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
System.Runtime.InteropServices.COMException
Stack Trace:
at WMPLib.IWMPPlaylistCollection.newPlaylist(String bstrName)
at BrinaS941.ScreenSaverVideo.ScreenSaver_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Here is the code that throws the exception:
private void ScreenSaverVideo_Load(object sender, EventArgs e)
{
WMPLib.IWMPPlaylist playlist = VideoPlayer.playlistCollection.newPlaylist("myplaylist");
WMPLib.IWMPMedia media;
VideoPlayer.uiMode = "none";
VideoPlayer.settings.volume = 10;
[....]
The exception began to increase while the application was running and now continues to have the same behavior.
I tried reinstalling Windows Media Player (11) on my XP computer, but nothing changed.
UPDATE:
, ( "URL", , ), . ...
.