简体   繁体   English

C#UWP应用程序中的指纹扫描仪

[英]Fingerprint scanner in C# UWP application

Background 背景

I want to make my question as specific as possible but still give a broad background of why I'm asking... My goal is to create a brand new cross platform application which incorporates fingerprint recognition via the use of a reasonably high quality / accurate scanner. 我想让我的问题尽可能具体,但仍然要给出为什么我要问的广阔背景...我的目标是创建一个全新的跨平台应用程序,该应用程序通过使用合理的高质量/准确度来结合指纹识别扫描器。 The requirements state that the application must allow lots of people to quickly be identified in quick succession (eg a line at a checkout). 要求指出,应用程序必须允许快速连续地快速识别很多人(例如,结帐时的排队)。 As well as do other stuff like communicate with a cloud based app etc... 以及与基于云的应用程序进行通信等其他工作...

I acquired a reasonably priced scanner (USB Hamster Pro 20 - Secugen) and obtained the .NET SDK and device drivers from the hardware vendor. 我购买了价格合理的扫描仪(USB Hamster Pro 20-Secugen),并从硬件供应商处获取了.NET SDK和设备驱动程序。

Initially I had imagined a Xamarin app but since device drivers are only available for Windows, Linux and Android I thought I would just settle for Windows. 最初,我曾设想过Xamarin应用程序,但是由于设备驱动程序仅适用于Windows,Linux和Android,因此我认为我只会适应Windows。 And as its a brand new app why not use UWP and take the benefits of UWP and Windows Store etc... . 并且作为其全新的应用程序,为什么不使用UWP并利用UWP和Windows Store等的优势。 I want to develop this application in C#.NET and ideally target something like a surface pro tablet. 我想在C#.NET中开发此应用程序,并且理想地针对诸如Surface Pro Tablet之类的东西。

Upon inspection of the 3rd party dll provided with the SDK, I noticed that to enable Auto-On (event based scanning), a method signature requires the handle of the window which will receive the message of the event from the device driver. 在检查SDK附带的第3方dll后,我注意到要启用自动开启(基于事件的扫描),方法签名需要窗口的句柄,该窗口的句柄将从设备驱动程序接收事件的消息。 The docs say to override WndProc of the receiving "window" to handle the events. 文档说要重写接收“窗口”的WndProc来处理事件。

Question

With this SDK(dll) am I forced to use WinForms or WPF? 有了这个SDK(dll),我是否被迫使用WinForms或WPF? Is there something fancy I can do to capture these events from within a UWP or Console app? 我可以从UWP或控制台应用程序中捕获这些事件吗?

Similar Questions 类似问题

During my research, I found these similar questions on SO and (I think) they suggest that UWP is out of the question. 在研究过程中,我发现了关于SO的这些类似问题,并且(我认为)它们表明UWP是不可能的。

Message pump in .NET Windows service .NET Windows服务中的消息泵

How to receive simplest Windows message on UWP XAML MVVM app? 如何在UWP XAML MVVM应用程序上接收最简单的Windows消息?

UWP cannot receive window event messages, request your vendor to provide a library targeting UWP. UWP无法接收窗口事件消息,请您的供应商提供针对UWP的库。

Or, more practical, I would suggest doing this in two steps, 或者,更实际一点,我建议分两个步骤进行操作,

First write a WinForm/WPF app that handles the scanner messages (by overriding WndProc ), the window can be hidden so user won't even know there is another desktop app running. 首先编写一个处理扫描程序消息的WinForm/WPF应用程序(通过重写WndProc ),该窗口可以隐藏,因此用户甚至都不知道正在运行另一个桌面应用程序。

After the WinForm/WPF is finished, wire it up with the UWP app, using various communication channels between a classic desktop application and a UWP app. WinForm/WPF完成后,使用经典桌面应用程序和UWP应用程序之间的各种通信渠道将其与UWP应用程序连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM