为了避免在加载设计器之前可能的数据丢失:未声明变量AxWindowsMediaPlayer1或未对其进行分配. [英] To prevent possible data loss before loading the designer: The variable AxWindowsMediaPlayer1 is either undeclared or was never assigned.

查看:229
本文介绍了为了避免在加载设计器之前可能的数据丢失:未声明变量AxWindowsMediaPlayer1或未对其进行分配.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VB项目,在其中添加了Windows Media Player作为组件.该项目是一种可以访问六个Internet广播电台的广播.我有一个64位处理器.调试时,一切正常,但是当我进行重建时,我得到了 以下错误消息:

I have a VB project where I have added the Windows Media Player as a component. The project is a radio that accesses six internet radio stations. I have a 64-bit processor. When I debug, everything works fine, but when I do a rebuild, I get the following error message:

为防止在加载设计器之前可能丢失数据:未声明变量或从未分配变量AxWindowsMediaPlayer1.当我选择转到代码"时,它带我到以下代码行:Me.Controls.Add(Me.AxWindowsMediaPlayer1).

To prevent possible data loss before loading the designer: 'The variable AxWindowsMediaPlayer1 is either undeclared or was never assigned.' When I select "Go to Code," it takes me to this line of code: Me.Controls.Add(Me.AxWindowsMediaPlayer1).

在错误列表(当前项目)中,我得到以下信息:

In the Error List, Current Project, I get the following:

"处理COM参考"WMPLib";从路径c:\ WINDOWS \ system32 \ wmp.dll.类型库导入程序遇到类型为"WMPLib.IWMPNowPlayingHelperDispatch"的属性获取器"sessionPlaylistCount",但没有有效的返回类型.进口商将 尝试将此属性作为方法导入."

"Processing COM reference "WMPLib" from path c:\WINDOWS\system32\wmp.dll. Type library importer encountered a property getter 'sessionPlaylistCount' on type 'WMPLib.IWMPNowPlayingHelperDispatch' without a valid return type. The importer will attempt to import this property as a method instead."

"处理COM参考"WMPLib";从路径"C:\ WINDOWS \ system32 \ wmp.dll".至少,"IWMPGraphEventHandler.NotifyAcquireCredentials"的参数之一不能被运行时封送处理程序封送处理.因此,此类论点将 不能将其作为指针传递,并且可能需要使用不安全的代码来进行操作.

"Processing COM reference "WMPLib" from path "C:\WINDOWS\system32\wmp.dll. At lease one of the arguments for 'IWMPGraphEventHandler.NotifyAcquireCredentials' cannot be marshaled by the runtime marshaler. Such arguments will therefore be passed as a pointer and may require unsafe code to manipulate."

任何人都可以帮助我理解这些错误消息并解释纠正这些问题所需采取的措施吗?非常感谢您能给我的任何帮助!

Can anyone help me to understand these error messages and explain what I need to do to correct these issues? Thanks so much for any help you can give me!

tsphil25

推荐答案

尝试使用真正的.Net Mediaplayer,因为MSDN上搜索引擎的工作方式始终指向您那只老兽.

Try the real .Net mediaplayer, because of the way the search engine on MSDN works you are always directed to that old beast.

http://msdn.microsoft.com/zh-CN/library/system.windows.media.mediaplayer(v=vs.110).aspx


这篇关于为了避免在加载设计器之前可能的数据丢失:未声明变量AxWindowsMediaPlayer1或未对其进行分配.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆