title: Attempted to read or write protected memory when capture video using Emgu-CV
body: <p>I try to capture video using Emgu-CV but I have an error. My code of the following:    </p>
  
  <pre><code>Timer My_Time = new Timer();
  int FPS = 30;
  
  public Form1()
  {
         InitializeComponent();
  
         //Frame Rate
         My_Timer.Interval = 1000 / FPS;
         My_Timer.Tick += new EventHandler(My_Timer_Tick);
         My_Timer.Start();
         _capture = new Capture("test.avi");   
  }
  
  private void My_Timer_Tick(object sender, EventArgs e)
  {
         imageBox.Image = _capture.QueryFrame();
  }
  </code></pre>
  
  <p>The error occurs at </p>
  
  <pre><code>_capture = new Capture("test.avi"); 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/tI008.jpg" alt="enter image description here"></p>
  
  <p>Thanks.</p>
  
  <p>Detail 
  <img src="https://i.stack.imgur.com/LO8MV.jpg" alt="enter image description here"></p>