Reference to wmp.dll (\windows\system32\wmp.dll)

别等时光非礼了梦想. 提交于 2019-12-11 01:02:10

问题


Can I use a reference to wmpLib.ddl / wmp.dll (\windows\system32\wmp.dll) in a commercial application?

I am using Visual Studio 2008 Express edition. I have to deliver that DLL.


回答1:


To add to Darins reply: I don't think that you can simply deploy wmp.dll with your product (I'm guessing you're thinking about doing that from the last sentence "I have to deliver that dll.")!

You will have to create an installer that checks whether the correct version of the DLL is present on the target system and have the user install the correct version of Windows Media Player in case it is not there.




回答2:


You can't reference wmp.dll directly as it is not a managed library. You could do this instead:

  1. Choose a category in the Toolbox.
  2. Right-click on that and choose Choose ToolBox Items.
  3. Open the COM Components Tab.
  4. Search for Windows Media Player.

This will generate .NET wrappers and add Windows Media Player component to your project where you can manipulate it directly.



来源:https://stackoverflow.com/questions/1648468/reference-to-wmp-dll-windows-system32-wmp-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!