如何处理c#中的accessvoilation异常 [英] how to handle accessvoilation exception in c#

查看:134
本文介绍了如何处理c#中的accessvoilation异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的隐写术项目,我必须将嵌入式框架粘贴到orignal框架中,我使用的是 avifile库但是我面临异常所以我需要解决这个异常......

i必须粘贴一个帧但是avifile库只处理视频流然后我制作了1帧的视频流...





for my steganography project i have to paste the embedded frame into the orignal frame ,i am using avifile library but i am facing an exception so i need solution of this exception......
i have to paste a frame but avifile library only deals with the video stream then i made a video stream of 1 frame ...


private void btnPaste_Click(object sender, EventArgs e)
        {
           
            
            OpenFileDialog open = new OpenFileDialog();
           // open.Filter = "Bitmap Image|*.bmp";
            if (open.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    Bitmap bb = new Bitmap(open.FileName);
                    VideoStream CreateVideo = new VideoStream(1111, false, 25, bb);//exception occures here (accessvoilation exception)
                  
                    editableStream.Paste(CreateVideo, 0, 156, 1);
                }
                    catch (System.Exception ex)
            {
                throw new Exception(string.Format("StackTrace = {0}", ex.StackTrace));
            }

推荐答案

这篇关于如何处理c#中的accessvoilation异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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