public void CaptureFinalize() { try { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapFinalize(); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); } finally { if (this.grStatusEventHandler != null) { this.grStatusEventHandler = null; if (this.gchStatus.IsAllocated) { this.gchStatus.Free(); } } } }
private void CaptureInitialize(GrStatusEventHandler grStatusEventHandler) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapInitialize(grStatusEventHandler); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void Initialize() { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrInitialize(); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); this.bInitialized = true; }
public static int DecodeBase64(IntPtr encodedBuffer, int encodedSize, ref IntPtr decodedBuffer, ref int decodedSize) { int errorCode = 0; try { errorCode = GrFingerprintProxy.DecodeBase64(encodedBuffer, encodedSize, decodedBuffer, ref decodedSize); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); return errorCode; }
private int Verify(IntPtr queryTemplate, IntPtr referenceTemplate, out int verifyScore, int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrVerify(queryTemplate, referenceTemplate, out verifyScore, context); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); return errorCode; }
public void StartEnroll(int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrStartEnroll(context).ToInt32(); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void SetVerifyParameters(int verifyThreshold, int verifyRotationTolerance, int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrSetVerifyParameters(verifyThreshold, verifyRotationTolerance, context); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void SetBiometricDisplayColors(int minutiaeColor, int minutiaeMatchedColor, int segmentColor, int segmentMatchedColor, int inclinationColor, int inclinationMatchedColor) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrSetBiometricDisplayColors(minutiaeColor, minutiaeMatchedColor, segmentColor, segmentMatchedColor, inclinationColor, inclinationMatchedColor); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void SaveRawImageToFile(FingerprintRawImage rawImage, string fileName, GrCaptureImageFormat imageFormat) { try { IntPtr destination = Marshal.AllocCoTaskMem(rawImage.Width * rawImage.Height); Marshal.Copy(rawImage.RawImage, 0, destination, rawImage.Width * rawImage.Height); this.SaveRawImageToFile(destination, rawImage.Width, rawImage.Height, fileName, imageFormat); Marshal.FreeCoTaskMem(destination); } catch (OutOfMemoryException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } }
public void GetBiometricDisplay(FingerprintTemplate tptQuery, FingerprintRawImage rawImage, IntPtr hdc, ref IntPtr handle, int matchContext) { try { IntPtr destination = Marshal.AllocCoTaskMem(rawImage.Width * rawImage.Height); Marshal.Copy(rawImage.RawImage, 0, destination, rawImage.Width * rawImage.Height); this.GetBiometricDisplay(tptQuery, destination, rawImage.Width, rawImage.Height, rawImage.Resolution, hdc, ref handle, matchContext); Marshal.FreeCoTaskMem(destination); } catch (OutOfMemoryException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } }
public void ExtractEx(FingerprintRawImage fingerPrintRawImage, ref FingerprintTemplate fingerTemplate, int context, GrTemplateFormat tptFormat) { try { IntPtr destination = Marshal.AllocCoTaskMem(fingerPrintRawImage.Width * fingerPrintRawImage.Height); Marshal.Copy(fingerPrintRawImage.RawImage, 0, destination, fingerPrintRawImage.Width * fingerPrintRawImage.Height); this.ExtractEx(destination, fingerPrintRawImage.Width, fingerPrintRawImage.Height, fingerPrintRawImage.Resolution, ref fingerTemplate, context, (int) tptFormat); Marshal.FreeCoTaskMem(destination); } catch (OutOfMemoryException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } }
private int Enroll([In] IntPtr rawimage, int width, int height, int res, IntPtr tpt, ref int tptSize, ref int quality, int tptFormat, int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrEnroll(rawimage, width, height, res, tpt, ref tptSize, ref quality, tptFormat, context); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); return errorCode; }
public static int EncodeBase64(IntPtr buffer, int bufferSize, ref IntPtr encodedBuffer, ref int encodedSize) { int num = 0; try { num = GrFingerprintProxy.EncodeBase64(buffer, bufferSize, encodedBuffer, ref encodedSize); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } return num; }
public void DestroyContext(int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrDestroyContext(context); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public static void InstallLicense(string productKey) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrInstallLicense(productKey); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void LoadImageFromFile(string filename, int res) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapLoadImageFromFile(filename, res); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
private void GetBiometricDisplay(FingerprintTemplate tptQuery, IntPtr rawImage, int width, int height, int res, IntPtr hdc, ref IntPtr handle, int matchContext) { IntPtr zero = IntPtr.Zero; try { zero = Marshal.AllocHGlobal(tptQuery.Size); Marshal.Copy(tptQuery.Buffer, 0, zero, tptQuery.Size); int errorCode = 0; try { errorCode = GrFingerprintProxy.GrBiometricDisplay(zero, rawImage, width, height, res, hdc, ref handle, matchContext); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); } catch (OutOfMemoryException exception3) { throw new FingerprintException(-7, exception3); } finally { Marshal.FreeHGlobal(zero); } }
private void SaveRawImageToFile(IntPtr rawimage, int width, int height, string fileName, GrCaptureImageFormat imageFormat) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapSaveRawImageToFile(rawimage, width, height, fileName, imageFormat); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public void GetHandlerFromRawImage(FingerprintRawImage rawImage, IntPtr hdc, ref IntPtr image) { try { IntPtr destination = Marshal.AllocCoTaskMem(rawImage.Width * rawImage.Height); Marshal.Copy(rawImage.RawImage, 0, destination, rawImage.Width * rawImage.Height); this.GetHandlerFromRawImage(destination, rawImage.Width, rawImage.Height, hdc, ref image); Marshal.FreeCoTaskMem(destination); } catch (OutOfMemoryException exception) { FingerprintException exception2 = new FingerprintException(-7, exception); throw exception2; } }
public static void SetLicenseFolder(string licenseFolder) { try { GrFingerprintProxy.GrSetLicenseFolder(licenseFolder); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } }
private void GetHandlerFromRawImage(IntPtr rawImage, int width, int height, IntPtr hdc, ref IntPtr image) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapRawImageToHandle(rawImage, width, height, hdc, ref image); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
private void StartCapture(string sensor, GrFingerEventHandler grFingerEventHandler, GrImageEventHandler grImageEventHandler) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapStartCapture(sensor, grFingerEventHandler, grImageEventHandler); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
public static GrLicense GetStrGrFingerVersion(ref byte majorVersion, ref byte minorVersion) { int num = 0; try { num = GrFingerprintProxy.GrGetGrFingerVersion(ref majorVersion, ref minorVersion); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } return (GrLicense) num; }
public void StopCapture(object idSensor) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrCapStopCapture(idSensor.ToString()); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } finally { if (this.gchFinger.IsAllocated) { this.gchFinger.Free(); } if (this.gchImage.IsAllocated) { this.gchImage.Free(); } } FingerprintException.CheckError(errorCode); }
private void IdentifyPrepare(IntPtr queryTemplate, int context) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrIdentifyPrepare(queryTemplate, context); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }
private void ShowFPError(FingerprintException ex) { if (this.InvokeRequired) { this.Invoke(new DelegateShowFPError(ShowFPError), new object[] { ex }); } else { MessageBox.Show(String.Format("OnImage Error : {0} {1}", ex.ErrorCode, ex.Message), "FPLibrary Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ConvertTemplate([In] IntPtr tpt, [Out] IntPtr newTpt, ref int newTptSize, int context, int format) { int errorCode = 0; try { errorCode = GrFingerprintProxy.GrConvertTemplate(tpt, newTpt, ref newTptSize, context, format); } catch (AccessViolationException exception) { FingerprintException exception2 = new FingerprintException(-113, exception); throw exception2; } FingerprintException.CheckError(errorCode); }