Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7555819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:42:36+00:00 2026-05-30T11:42:36+00:00

I have these classes: Form1.cs Server.cs Now when I do in Server.cs form1.startCapture(C:\\test.mp4); Then

  • 0

I have these classes:

Form1.cs

Server.cs

Now when I do in Server.cs

form1.startCapture("C:\\test.mp4");

Then in Form1.cs

public void startCapture(String filename)
    {
       short result = this.axVideoCap1.Start();
    }

I get then a System.AccessViolationException

System.Runtime.InteropServices.COMException was unhandled.
Message = An attempt was made to read or write protected memory. This is often an indication that other memory is corrupt.
Source = mscorlib
Stack Trace:
    at System.RuntimeType.ForwardCallToInvokeMember (String membername, BindingFlags flags, Object target, Int32 [] aWrapperTypes, Message & msgData)
    at VIDEOCAPLib._DVideoCap.Start ()
    at AxVIDEOCAPLib.AxVideoCap.Start ()
...

How can I solve this error?

public void startCapture(String filename)
    {

            this.axVideoCap1.CaptureVideo = this.captureVideoCheckBox.Checked;
            this.axVideoCap1.CaptureAudio = this.captureAudioCheckBox.Checked;

            this.axVideoCap1.ShowPreview = this.showPreviewCheckBox.Checked;
            this.axVideoCap1.UseVideoCompressor = this.useVideoCapCheckBox.Checked;
            this.axVideoCap1.UseAudioCompressor = this.useAudioCapCheckBox.Checked;

            this.axVideoCap1.CaptureMode = true;
            this.axVideoCap1.CaptureFileName = filename;

            this.axVideoCap1.SyncMode = 1;

            short result = this.axVideoCap1.Start();

            switch (result)
            {
                case -1:
                    MessageBox.Show("Capture Failure,Video, Audio Compressor not correct or capture file opening");
                    return;
                case -2:
                    MessageBox.Show("Capture file not found");
                    return;
            }

            this.previewButton.Enabled = false;
            this.captureButton.Enabled = false;
            this.stopButton.Enabled = true;

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:42:38+00:00Added an answer on May 30, 2026 at 11:42 am

    I fixed it, I have run an infinite loop in Form1.
    Form1 started Server and Server accessed Form1.
    Now I created Start.cs that starts Server and Form1 in a second thread.

    Needed some Invoke Callbacks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

let's have these classes: public class MyObject { //constructor and other stuff public bool
I have a website where businesses can load items for sale. Then end users
I have a WPF application which so far has been client only, but now
Using: C#, VS2008 I have the following main form class: [Main.cs] namespace Server {
I have 2 different Java projects, one has 2 classes: dynamicbeans.DynamicBean2 and dynamic.Validator .
I have two classes in a model . One is Sdr_Layer class . Other
Given the following classes and controller action method: public School { public Int32 ID
I have a form that is a validation field, there is a rand() server
I have various classes for handling form data and querying a database. I need
For those interested, I have now modified the SubSonic 2.x code to recognize and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.