How to use ZK4500 Fingerprint Scanner SDK in C# Project(如何在 C# 项目中使用 ZK4500 指纹扫描仪 SDK)
问题描述
我正在用 C# 开发一个项目,我想使用他们的指纹登录/验证用户.
I am developing a project in C#, for which I want to login/authenticate a user using their fingerprint.
我购买了 ZK4500 指纹扫描仪,并从 http://www.zkteco 获得了它的 SDK.com/product/ZK4500_238.html.SDK 采用 C++ 语言.
I bought a ZK4500 Fingerprint scanner and got its SDK from http://www.zkteco.com/product/ZK4500_238.html. The SDK is in C++.
那么,如何将此 SDK 与我的 C# 项目集成以执行所需的功能?
So How can I integrate this SDK with my C# project to perform the desired functionality?
推荐答案
您需要添加对将出现在 COM 类型库下的 ZKFPEngXControl 的引用.之后,您可以使用 ZKFPEngX 类做任何您需要的事情.
You need to add reference to ZKFPEngXControl that will appear under COM Type Libraries. After that you can use the ZKFPEngX Class to do whatever you require.
using ZKFPEngXControl;
然后
ZKFPEngX fp = new ZKFPEngX();
fp.SensorIndex = 0;
fp.InitEngine(); // Do validation as well as it returns an integer (0 for success, else error code 1-3)
//subscribe to event for getting when user places his/her finger
fp.OnImageReceived += new IZKFPEngXEvents_OnImageReceivedEventHandler(fp_OnImageReceived);
您可以编写自己的方法 fp_OnImageReceived 来处理事件.例如你可以用那个方法写这个;
You can write your own method fp_OnImageReceived to handle the event. for example you can write this in that method;
object imgdata = new object();
bool b = fp.GetFingerImage(ref imgdata);
其中 imgdata 是一个字节数组.您还可以使用 ZKFPEngX 中的其他方法来实现您的目标.记得在表单关闭时关闭引擎.
Where imgdata is an array of bytes.You can also use other methods in ZKFPEngX, to achieve your goals. Remember to close the engine when form closes.
fp.EndEngine();
这篇关于如何在 C# 项目中使用 ZK4500 指纹扫描仪 SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 C# 项目中使用 ZK4500 指纹扫描仪 SDK


- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01