Exception when opening a video file using MediaPlayer class from a service RRS feed

  • Question

  • I'm using C# and the MediaPlayer class (
    to open a video file programmatically and send frames to a client. Everything works fine, however my code needs to run from a service, but when I open the file, I get the following exception in the MediaFailed event:

        COMException ('Exception from HRESULT: 0xC00D11BA')

    I have googled it and there is not too much information about it other than a possible sound card issue, which I don't think it should be related because it opens just fine when I'm not running it from a service. Any ideas?

    Distant Galaxies available for [url=]XBOX[/url] and [url=]WP7[/URL]. Twitter: [url=!/distantgalaxies]@distantgalaxies[/url]

    Monday, May 28, 2018 12:56 PM

All replies

  • Newer OS versions are more and more blocking that services access direct the user interface. 

    Therefore if it does not fail today, probably tomorrow. 


    Monday, May 28, 2018 3:35 PM
  • Hello,

     Services are mostly run without User interaction because the service provide

    OS functionality and security layer. However, maybe if you consider the project

    operational workflow more like Broadcast Server.  You can launch on startup or

    from Task Scheduler with proper security credentials. But, if your project must

    be a Service then change the way IO of data is handled. Like, a config file with

    pending video filenames to send out. If the config is empty, or scripted for your

    project purposes much like installer script files are then the service doesn't do

    anything. The service would also periodically checks the config for something to

    do.  The workflow of the project depends on that end goal.


     Just something to consider, thanks :)

    Tuesday, May 29, 2018 3:49 AM