public void StartCapture(object sensor) { if (this.grFingerEventHandler == null) { this.grFingerEventHandler = new GrFingerEventHandler(this.OnFinger); this.gchFinger = GCHandle.Alloc(this.grFingerEventHandler); } if (this.grImageEventHandler == null) { this.grImageEventHandler = new GrImageEventHandler(this.OnImage); this.gchImage = GCHandle.Alloc(this.grImageEventHandler); } this.StartCapture(sensor.ToString(), this.grFingerEventHandler, this.grImageEventHandler); }
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 extern int GrCapStartCapture(string idSensor, GrFingerEventHandler fingerEventHandler, GrImageEventHandler imageEventHandler);