Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Fingerprint scanning application

$
0
0

Hello, I'm fairly new to hardware<->software development and I'm not exactly sure if this question is in the right place, but I'm pretty much sure that it has to do with Accessibility. 

Well, my problem is that I'm trying to interface a fingerprint scanner with a Windows Forms Application (C#), the fingerprint scanner being a Chinese made hardware namedSyno Finger Module USB Device (and its listed on the DVD/CD-ROM when looking it up on the Device Manager), with no proper documentation (I've managed to secure a "working" documentation, but it doesn't explain the body of the iceberg), a not accessible .lib and .dll file (when adding it as a reference on VS 2019 Enterprise) - pretty much Dependecy Walker is my friend at this point. When I tried accessing the fingerprint scanner using a kernel32.dll CreateFile, it returns a handle - but it returns an System.AccessViolationException at some point of the code during debugging execution. 

The scanner .dll file is written in C++ as stated on the documentation, so I know that datatypes are needed to be an exact match during calling. I'm in desperate need of enlightenment on what I'm doing wrong and what are my options at this point. 

The CreateFile function is using (SafeHandle hScanner = CreateFile(path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero))and it throws an exception at code line return PSGetImage(hHandle,nDevAddr). 

The exception thrown is:  

System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'

Any input is welcome. Cheers!

Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>