找不到sgfplib.dll

时间:2019-09-09 15:28:31

标签: c#-7.0

我试图通过C#代码捕获指纹。我已经引用了Windows版本2.3.3.0的secugen FDx Pro SDK,并安装了驱动程序。虽然我看不到其他dll文件中的sgfplib.dll。

当我运行尝试初始化使用sgfplib.dll的SGFingerPrintManager的代码时,它抱怨“找不到sgfplib.dll”,我已经在该平台上阅读了先前的建议,但没有解决问题。

请先感谢您提出任何解决此问题的建议。

谢谢。

a)我已经下载了用于Windows的FDx Pro SDK和secugen驱动程序版本6.7(64)。 b)另外,我尝试将sgfplid.dll复制到项目的bin文件夹中,但问题仍然存在。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using LuggageTrackingAndBillingSystem.models;
using SecuGen.FDxSDKPro.Windows;
namespace LuggageTrackingAndBillingSystem
{
    public partial class TsetForSecugen : Form
    {
        Int32 image_width = 200;
        Int32 image_height = 300;
        Int32 image_dpi = 500;

        public TsetForSecugen()
        {
            InitializeComponent();
            InitializeDedive();

        }
        private SGFingerPrintManager m_FPM;

        SGFPMDeviceName device_name = SGFPMDeviceName.DEV_FDU03;

        private void InitializeDedive()
        {
            //Step 1
            if (RuntimePolicyHelper.LegacyV2RuntimeEnabledSuccessfully)
            {
                // This will load a CLR 2 mixed mode assembly
                  m_FPM = new SGFingerPrintManager();
            }

            var err = m_FPM.InitEx(image_width, image_height, image_dpi);
        }
        private void DrawImage(Byte[] imgData, PictureBox picBox)
        {
            int colorval;
            Bitmap bmp = new Bitmap(image_width, image_height);
            picBox.Image = (Image)bmp;

            for (int i = 0; i < bmp.Width; i++)
            {
                for (int j = 0; j < bmp.Height; j++)
                {
                    colorval = (int)imgData[(j * image_width) + i];
                    bmp.SetPixel(i, j, Color.FromArgb(colorval, colorval, colorval));
                }
            }
            picBox.Refresh();
        }

        private void GetImage()
        {
          //Capturing Finger Image Step 3
            Byte[] fp_image = new Byte[image_width * image_height];
            Int32 iError;
            iError = m_FPM.GetImage(fp_image);
            if (iError == (Int32)SGFPMError.ERROR_NONE)
            {
                DrawImage(fp_image, pictureBox1);
            }
        }

        private void TsetForSecugen_Load(object sender, EventArgs e)
        {
            InitializeDedive();


            GetDevieInfo();




        }
        private void GetDevieInfo()
        {
            #region Det Device Info step 2
            //Get Device info
            SGFPMDeviceInfoParam pInfo = new SGFPMDeviceInfoParam();
            pInfo = new SGFPMDeviceInfoParam();
            Int32 iError = m_FPM.GetDeviceInfo(pInfo);
            if (iError == (Int32)SGFPMError.ERROR_NONE)
            {
                image_width = pInfo.ImageWidth;
                image_height = pInfo.ImageHeight;
            }
            #endregion
        }

        private void button1_Click(object sender, EventArgs e)
        {
            GetImage();
        }
    }
}

实际结果:预期结果是能够捕捉指尖

错误度量:标题[FDx SDK Pro.NET]。正文[找不到sgfplib.dll]

1 个答案:

答案 0 :(得分:0)

我已经通过获取用于Windows的FDx SDK Pro的可执行文件并进行安装来解决了该问题。

问题是由FDx SDK Pro引起的。对于Windows无法看到sgfplib.dll文件,该文件在安装过程中自动安装在Windows / System32和Windows / sysWOW64目录中。

感谢所有人。