GetFingerprintPointer() приватный Метод

Gets the fingerprint pointer.
private GetFingerprintPointer ( string key ) : IntPtr
key string The key.
Результат System.IntPtr
Пример #1
0
        /// <summary>
        /// Verifies the fingerprint.
        /// </summary>
        /// <param name="galleryKey">The gallery key.</param>
        /// <param name="gallery">The gallery.</param>
        /// <param name="pgmFilePath">The PGM file path.</param>
        /// <returns></returns>
        public bool VerifyFingerprint(string galleryKey, FingerprintGallery gallery, string pgmFilePath)
        {
            // Make sure the device is open
            if (IsOpen == false)
            {
                this.Open();
            }

            // Acquire the pointer to the stored fingerprint
            var fingerprintPtr = gallery.GetFingerprintPointer(galleryKey);

            if (fingerprintPtr == IntPtr.Zero)
            {
                return(false);
            }

            var printImagePtr = IntPtr.Zero;

            // Perform verification
            var resultCode = Interop.fp_verify_finger_img(this.RealDevicePtr, fingerprintPtr, out printImagePtr);

            // Save the PGM file if required by the user
            SaveImageToDisk(printImagePtr, pgmFilePath, true);

            if (resultCode == (int)Interop.fp_verify_result.FP_VERIFY_MATCH)
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        /// <summary>
        /// Verifies the fingerprint.
        /// </summary>
        /// <param name="galleryKey">The gallery key.</param>
        /// <param name="gallery">The gallery.</param>
        /// <param name="pgmFilePath">The PGM file path.</param>
        /// <returns></returns>
        public bool VerifyFingerprint(string galleryKey, FingerprintGallery gallery, string pgmFilePath)
        {
            // Make sure the device is open
            if (IsOpen == false)
                this.Open();

            // Acquire the pointer to the stored fingerprint
            var fingerprintPtr = gallery.GetFingerprintPointer(galleryKey);
            if (fingerprintPtr == IntPtr.Zero) return false;

            var printImagePtr = IntPtr.Zero;

            // Perform verification
            var resultCode = Interop.fp_verify_finger_img(this.RealDevicePtr, fingerprintPtr, out printImagePtr);

            // Save the PGM file if required by the user
            SaveImageToDisk(printImagePtr, pgmFilePath, true);

            if (resultCode == (int)Interop.fp_verify_result.FP_VERIFY_MATCH)
                return true;

            return false;
        }