资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MvCamCtrl.NET;
using System.Runtime.InteropServices;
using System.Threading;
using System.IO;

using System.Drawing.Imaging;
using System.Diagnostics;
using System.Collections.objectModel;

namespace BasicDemo
{
    public partial class Form1 : Form
    {
        MyCamera.MV_CC_DEVICE_INFO_LIST m_pDeviceList;
        private MyCamera m_pMyCamera;
        bool m_bGrabbing;

        // ch:用于从驱动获取图像的缓存 | en:Buffer for getting image from driver
        UInt32 m_nBufSizeForDriver = 3072 * 2048 * 3;
        byte[] m_pBufForDriver = new byte[3072 * 2048 * 3];

        // ch:用于保存图像的缓存 | en:Buffer for saving image
        UInt32    m_nBufSizeForSaveImage = 3072 * 2048 * 3 * 3 + 2048;
        byte[] m_pBufForSaveImage = new byte[3072 * 2048 * 3 * 3 + 2048];

        public Form1()
        {
            InitializeComponent();
            m_pDeviceList = new MyCamera.MV_CC_DEVICE_INFO_LIST();
            m_bGrabbing = false;
            DeviceListAcq();
        }

        // ch:显示错误信息 | en:Show error message
        private void ShowErrorMsg(string csMessage int nErrorNum)
        {
            string errorMsg;
            if (nErrorNum == 0)
            {
                errorMsg = csMessage;
            }
            else
            {
                errorMsg = csMessage + “: Error =“ + String.Format(“{0:X}“ nErrorNum);
            }

            switch (nErrorNum)
            {
                case MyCamera.MV_E_HANDLE: errorMsg += “ Error or invalid handle “; break;
                case MyCamera.MV_E_SUPPORT: errorMsg += “ Not supported function “; break;
                case MyCamera.MV_E_BUFOVER: errorMsg += “ Cache is full “; break;
                case MyCamera.MV_E_CALLORDER: errorMsg += “ Function calling order error “; break;
                case MyCamera.MV_E_PARAMETER: errorMsg += “ Incorrect parameter “; break;
                case MyCamera.MV_E_RESOURCE: errorMsg += “ Applying resource failed “; break;
                case MyCamera.MV_E_NODATA: errorMsg += “ No data “; break;
                case MyCamera.MV_E_PRECONDITION: errorMsg += “ Precondition error or running environment changed “; break;
                case MyCamera.MV_E_VERSION: errorMsg += “ Version mismatches “; break;
                case MyCamera.MV_E_NOENOUGH_BUF: errorMsg += “ Insufficient memory “; break;
                case MyCamera.MV_E_UNKNOW: errorMsg += “ Unknown error “; break;
                case MyCamera.MV_E_GC_GENERIC: errorMsg += “ General error “; break;
                case MyCamera.MV_E_GC_ACCESS: errorMsg += “ Node accessing condition error “; break;
                case MyCamera.MV_E_ACCESS_DENIED: errorMsg += “ No permission “; break;
                case MyCamera.MV_E_BUSY: errorMsg += “ Device is

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\.vs\
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\.vs\CSharpDotNetSamples_VS2008\
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\.vs\CSharpDotNetSamples_VS2008\v14\
     文件      109056  2020-04-20 19:53  海康相机采集图像例程C#\.vs\CSharpDotNetSamples_VS2008\v14\.suo
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\Backup\
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\Backup\BasicDemo\
     文件       27543  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.cs
     文件        7825  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.csproj
     文件       13559  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.Designer.cs
     文件        9208  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.en-US.resx
     文件       32295  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.resx
     文件        8776  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\BasicDemo.zh-CHS.resx
     文件         501  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Program.cs
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\Backup\BasicDemo\Properties\
     文件        1470  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Properties\AssemblyInfo.cs
     文件        2845  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Properties\Resources.Designer.cs
     文件        5612  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Properties\Resources.resx
     文件        1090  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Properties\Settings.Designer.cs
     文件         249  2018-03-29 11:14  海康相机采集图像例程C#\Backup\BasicDemo\Properties\Settings.settings
     文件       14900  2018-03-29 11:14  海康相机采集图像例程C#\Backup\CSharpDotNetSamples_VS2008.sln
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\Backup\ForceIpDemo\
     文件        9835  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.cs
     文件        5738  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.csproj
     文件        6318  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.Designer.cs
     文件        7949  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.en-US.resx
     文件       18212  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.resx
     文件        7228  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\ForceIpDemo.zh-CHS.resx
     文件         518  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\Program.cs
     目录           0  2020-04-20 19:46  海康相机采集图像例程C#\Backup\ForceIpDemo\Properties\
     文件        1470  2018-03-29 11:14  海康相机采集图像例程C#\Backup\ForceIpDemo\Properties\AssemblyInfo.cs
............此处省略313个文件信息

评论

共有 条评论