如何在 Windows 7 中通过 .net 播放视频
我设置了一个应用程序来使用建议的库此处来播放视频,这非常适合我很长一段时间,直到我的机器升级。在 Windows 7 中,我遇到了以下在 XP 下从未见过的异常:
`System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
at MainApp.Controls.MediaControl.StopVideo()
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)`
我已经安装了 2010 年 6 月的 DirectX SDK,但仍然收到此错误。我是否应该使用不同的库或需要更改某些设置?
I had setup an app to play a video using the library suggested here this worked great for me for a long time until my machine was upgraded. In windows 7 I get the following exception that I'd never seen under XP:
`System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
at MainApp.Controls.MediaControl.StopVideo()
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)`
I've installed the June 2010 DirectX SDK and I'm still getting this error. Is there a different library I should be using or some setting that needs to be changed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信你使用的是 x64 系统。
您使用的版本似乎是为 x86 而不是 x64 编译的。尝试从 directx 网站获取新版本,并确保在您运行的程序中包含 x64 版本。并重建你的图书馆。
I belive you are using x64 system.
It looks like you're using a version that is compiled for x86 instead of x64. Try grabbing a new version from the directx website and make sure to include the x64 version in the program you're running. And rebuild your library.