Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catastrophic failure (Exception from HRESULT: 0x8000FFFF) creating a playlist with axwindowsMediaPlayer

I am using the axwindowsMediaPlayer object to show videos in a winform. In particular I want to play a playlist.

Everything works fine on my pc (win7) and used to work fine also in another pc with winXP (the pc of the final user).

But something happened a couple of days ago: on the XP PC I started to receive the following expcetion

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 the code that rises 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 started to be risen while the application was working and now keep on having the same behavior.

I tried to reinstall Windows Media Player (11) on the XP machine, but nothing changed.

UPDATE:

I tried to comment the part of code related to the playlist (and use the method "URL" to set the video a want to play) and everything works fine. I am really puzzled...

Any help would be really appreciated. Thanks

like image 512
muccix Avatar asked Aug 06 '14 08:08

muccix


People also ask

How do I fix catastrophic failure 0x8000FFFF?

The 0x8000ffff error also occurs when you perform a system restore without using your computer's administrative rights. When you use other accounts, you may fail to overwrite certain system files. So, what you'd have to do is switch to the Administrator account or use the administrative rights of your computer.

What is catastrophic error 0x8000FFFF?

Catastrophic Failure (Error 0x8000FFFF) This error message occurs even though the code checks for duplicate multicast packets, and Windows Media Player is designed to handle the duplicate packet gracefully.


1 Answers

I finally found the problem!

My fault was not to remove the playlist once used (with IWMPPlaylistCollection::remove method ). I realized that I had 2000 playlists ( myplaylist.wpl, myplaylist(1).wpl,..., myplaylist(1999).wpl) in my file system and probably there is a limit of 2000.

I don't know if it's a limit of the file system or of WMP.

Once deleted all the files everything started working again.

Thanks everyone for your help!

like image 80
muccix Avatar answered Oct 19 '22 06:10

muccix