2

I installed ZKtecoFingerprint SDK and I'm trying to run the demo of this SDK but I got this exception!

System.DllNotFoundException: 'Unable to load DLL 'libzkfp.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'

Exception

References

How can I use the Zketco demo application??

Code :

  private void bnInit_Click(object sender, EventArgs e)
    {
        cmbIdx.Items.Clear();
        int ret = zkfperrdef.ZKFP_ERR_OK;
        if ((ret = zkfp2.Init()) == zkfperrdef.ZKFP_ERR_OK)
        {
            int nCount = zkfp2.GetDeviceCount();
            if (nCount > 0)
            {
                for (int i = 0; i < nCount; i++)
                {
                    cmbIdx.Items.Add(i.ToString());
                }
                cmbIdx.SelectedIndex = 0;
                bnInit.Enabled = false;
                bnFree.Enabled = true;
                bnOpen.Enabled = true;
            }
            else
            {
                zkfp2.Terminate();
                MessageBox.Show("No device connected!");
            }
        }
        else
        {
            MessageBox.Show("Initialize fail, ret=" + ret + " !");
        }
    }

Configuration Target x86

2
  • there are two ways , 1. after the installation better reboot your machine and try again, 2, if these dlls are runtime you may need to import them manually. I haven't used this SDK before. But I would try these options before investigating in detail.
    – coder_b
    Dec 25, 2020 at 11:34
  • Have you get any solution? Apr 21, 2021 at 4:26

2 Answers 2

4

Finally I found the solution. You have nothing to do. You just need to install the driver comes with sdk. I know this is too much late but I am writing this answer if later anyone found the solution. Thanks

1
  • Thanks, after doing a lot of headbanging this eventually helped. Dec 25, 2021 at 19:49
-1

Many of these, which connect to devices using SDKs, are 32/64bit related. Change your project configuration to x86 (32bit) and check it again.

3
  • The project configuration target is set to x86 by default , see the update please
    – user14743092
    Dec 25, 2020 at 11:20
  • Copy the libzkfp.dll manually beside of your .exe app in bin debug x86 folder. You can use DependancyWalker to check which module is loading or not. dependencywalker.com/help/html/overview_1.htm
    – TheMah
    Dec 25, 2020 at 11:50
  • I have already this file in the two folders , but there is no changes
    – user14743092
    Dec 25, 2020 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.