Cannot register wmp.dll in c# Express RRS feed

  • Question

  • When trying to add the Windows Media Control to the toolbox in c#, I get the following message:

    "self registration for c:\windows\system32\wmp.dll failed"

    I can add a reference to the project, but I'd prefer the ease of adding the control. I've registered the component using regsvr32 (getting the message that it's successfully registered) but the component still does not show in the toolbox.

    Using Vista Home Edition and Visual C# 2008 Express.

    Help please!
    Sunday, August 2, 2009 3:30 AM

All replies

  • Registration will not add the Window Media player control to your toolbox, you have to add it on your own. Follow the step below that i took from MSDN site http://msdn.microsoft.com/en-us/library/dd564585(VS.85).aspx

    Using the Windows Media Player Control with Microsoft Visual Studio

    You can add the Windows Media Player 9 Series or later ActiveX control to a .NET Framework application through the Toolbox in Visual Studio.

    Adding the Windows Media Player Control

    Before creating a new project, make sure that the latest version of Windows Media Player and the Windows Media Player SDK is installed on your computer.

    Start Visual Studio, then create a new project.

    In Visual Studio, open the Toolbox.

    If Windows Media Player does not appear in the Components portion of the Toolbox, do the following:

    1. Right-click within the Toolbox, and then select Choose Items. This opens the Customize Toolbox dialog box.
    2. On the COM Components tab, select Windows Media Player.

      If Windows Media Player does not appear in the list, click Browse, and then open Wmp.dll, which should be in the Windows\System32 folder.

    3. Click OK. The Windows Media Player control will be placed on the current Toolbox tab.

    You can now select Windows Media Player in the Toolbox and add it to a form.

    Visual Studio gives the Windows Media Player control a default name such as axWindowsMediaPlayer1. You may want to change the name to something more easily remembered, such as Player.

    Adding the Windows Media Player control from the Toolbox also adds references to two libraries created by Visual Studio, AxWMPLib and WMPLib. You can find them in the Solution Explorer under References.

    To make using the objects in the Player namespace easier, you should include the namespace in the using or imports directives of your files, as follows:


    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    Sunday, August 2, 2009 6:39 AM
  • Thanks for the response, but the steps you've outlined are what I followed and what produces the error message "self registration for c:\windows\system32\wmp.dll failed". When I browse to the c:\windows\system32 folder, select the wmp.dll and click the "open" button, the system throws the above mentioned error.

    BTW, the latest Windows SDK was already installed prior to trying to add the control to the toolbox. Doing searches for solutions to this problem and prior to this posting, I found that this had been identified as a bug with Visual Studio 2005, and the work-around recommended by Microsoft was to use the ocx version of the control instead. To the best of my knowledge, that control no longer exists (at least it's not present in the system32 folder).
    Sunday, August 2, 2009 2:39 PM
  • May be you should try to re-install Window media player on your computer


    I hope this helps, if that is what you want, just mark it as answer so that we can move on
    Sunday, August 2, 2009 4:39 PM
  • Hi,

    Have you tried re-installing wmp ?

    I saw someone can get it work properly when he re-install the operation system.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, August 7, 2009 2:24 AM