在c#win中播放视频时出错。形成 [英] Error in Playing Video in c# win. form
本文介绍了在c#win中播放视频时出错。形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Microsoft.DirectX.AudioVideoPlayback在这12t线上收到错误
i am getting error on this 12t line
using Microsoft.DirectX.AudioVideoPlayback;
namespace VideoTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Video ourVideo = new Video(@"E:\Iron Man Series\1.Iron.Man.2008.1080p.BluRay.x264.anoXmous.mp4");
}
}
}
错误: -
DLL'C:\ Windows \assembly\GAC \ Microsoft.DirectX \1.0.2902.0__31bf3856ad364e35\Microsoft.DirectX.dll'正在尝试在OS Loader锁内执行托管执行。不要尝试在DllMain或图像初始化函数中运行托管代码,因为这样做会导致应用程序挂起。
如何解决这个问题?
注意:视频是预定义的单词而不是控件。那么,用于显示视频的控件。
推荐答案
如何在表单上添加按钮,并从按钮单击事件播放视频处理程序,这有用吗?
否则,尝试WTF:更改调试器选项,如例如 http://stackoverflow.com/questions/56642/loader-lock-error [ ^ ]
What about adding a button on the form, and playing the video from the button click event handler, does that work?
Otherwise, try a WTF: change the debugger options, as described in e.g. http://stackoverflow.com/questions/56642/loader-lock-error[^]
这篇关于在c#win中播放视频时出错。形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文