none
Problem using WindowsMediaPlayer interface on Windows CE 6.0 RRS feed

  • Question

  • Hi all,

    I am trying to write a simple visual C# application that plays audio/video on a Windows Embedded CE 6.0 device. For this I am trying to use the 'WindowsMediaPlayer' interface. Below is the code snippet...

    Player = new WindowsMediaPlayer();
    Player.PlayStateChange += new _WMPOCXEvents_PlayStateChangeEventHandler(Player_PlayStateChange);
    Player.MediaError += new _WMPOCXEvents_MediaErrorEventHandler(Player_MediaError);
    Player.URL = url;
    Player.controls.play();
    

    I am adding the wmp.dll as a reference from my Windows 7 PC to build the solution. Build is successful. But when I am trying to run the application on the WinCE board I am getting an exception of type 'System.Runtime.InteropServices.COMException' (error: 0x80040154, can not be created with CLSID "{6BF52A52-394A-11D3-B153-00C04F79FAA6}" COM object.).

    Most probably the problem is with the version of  wmp.dll I am using. But can anybody please help me to find out the proper dll for WinCE 6.0. You can also suggest me an alternative solution (VC# or VC++). Any kind of help is appreciated.

    Please help me out of this situation - stucked here  for almost a week.

    Thanks in advance.

     

    Regards,

    Bitan

    • Moved by Jesse Jiang Wednesday, September 7, 2011 6:18 AM (From:Visual Studio Smart Device Development – Visual Basic and C# Projects)
    Monday, September 5, 2011 11:49 AM

All replies

  • It seems you're using desktop version of the DLL which might or might not match the device. You might want to make sure all the interfaces you're using are exact match between device and desktop.

    But start by verifying your device has required component(s). Windows CE is a modular OS, pretty much everything is optional and can be excluded from specific device by OEM. Also there are several licensing levels, certain components might only be allowed for premium versions. AFAIK WMP is one of them. You can check components here:

    http://www.microsoft.com/windowsembedded/en-us/develop/windows-embedded-ce-6-os-components.aspx


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Tuesday, September 6, 2011 4:32 PM
  • Hi Bitan,

     

    I think your issue should be raised in the Windows Embedded Compact Platform Development. I believe they will know more information of this issue than us, and I will move this one to that forum.

     

    Thanks for your understanding,

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, September 7, 2011 6:18 AM
  • Hi Jesse,

    Thanks for moving the thread at the right forum. Hope for more replies.

     

    With regards,

    Bitan

    Wednesday, September 7, 2011 10:16 AM