怎么找不到Interop.WMPLib这个引用

kiddkyd 2009-01-24 05:08:12
听说在COM组件里,但是我没找到.VS2005和2008都没找到.
...全文
408 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
我是一只菜鸟 2012-07-05
  • 打赏
  • 举报
回复
做个好人好事吧,那么,引用这个c:\Windows\system32\wmp.dll
宝_爸 2009-01-30
  • 打赏
  • 举报
回复
晕,lz没看我的答案吗?
kiddkyd 2009-01-30
  • 打赏
  • 举报
回复
看了,不明白
veiny 2009-01-30
  • 打赏
  • 举报
回复
http://topic.csdn.net/u/20081210/21/45bb3522-4b04-445c-895d-f11c1e884bea.html
看看这篇文章~!~!
宝_爸 2009-01-30
  • 打赏
  • 举报
回复
The following is the walkthrough to use a Windows Media Player COM
component in a WinForms application.

1. If the Windows Media Player COM component is not present in the Toolbox,
right-clikc on the Toolbox and choose 'Choose Items'. In the 'Choose
Toolbox Items' dialog, switch to the 'COM Components' tab. Navigate to
'Windows Media Player' (whose path is 'c:\Windows\system32\wmp.dll') and
select the checkbox before this item. Press OK.

2. Drag&drop the Window Media Player COM component from Toolbox onto a
form. At this time, VS IDE will generate wrapper classes for this COM
component automatically. COM components are not managed, so we couldn't use
them directly in .NET applications.

If you expand the Reference node under the project node in the Solution
Explorer, you should see two references called 'AxWMPLib' and 'WMPLib' are
added.

3. You may add the following code to the form:

private void Form1_Load(object sender, EventArgs e)
{
// the 'axWindowsMediaPlayer1' is the name of the Windows Media Player
COM component on the form
MessageBox.Show(this.axWindowsMediaPlayer1.versionInfo);
this.axWindowsMediaPlayer1.URL = "the path of the video/audio file";
}

4. Build the project. Go to the bin\debug folder of the application and you
should see two files called 'AxInterop.WMPLib.dll' and
'Interop.WMPLib.dll', which are the dll files that contain the wrapper
classes for the Windows Media Player COM component.

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧