Griaule Biometrics

Home » Forums » FINGERPRINT SDK » GrFinger 4.1 (ARCHIVE) » C# sample (GrFingerXSampleC#) compile error
1 reply [Last post]
Anonymous
Rate this post:
0
No votes yet
C# sample (GrFingerXSampleC#) compile error

Hi,

I was trying to compile GrFingerXSampleC# in Visuyal Studio 2005.
Conversion went fine, however I am getting some errors.

Is a updated sample or a quick fix available, or do I need to figure it myself ?:-)

Error 1 The best overloaded method match for 'AxGrFingerXLib.AxGrFingerXCtrl.BiometricDisplay(ref System.Array, ref object, int, int, int, int, ref System.Drawing.Image, int)' has some invalid arguments c:\Program Files\Griaule\GrFinger 4.1 FULL\samples\source\C#\GrFingerX\Util.cs 259 4 GrFingerXSampleC#

Error 2 Argument '7': cannot convert from 'ref stdole.IPictureDisp' to 'ref System.Drawing.Image' c:\Program Files\Griaule\GrFinger 4.1 FULL\samples\source\C#\GrFingerX\Util.cs 261 9 GrFingerXSampleC#

Error 3 The best overloaded method match for 'AxGrFingerXLib.AxGrFingerXCtrl.CapRawImageToHandle(ref object, int, int, int, ref System.Drawing.Image)' has some invalid arguments c:\Program Files\Griaule\GrFinger 4.1 FULL\samples\source\C#\GrFingerX\Util.cs 264 4 GrFingerXSampleC#

Error 4 Argument '5': cannot convert from 'ref stdole.IPictureDisp' to 'ref System.Drawing.Image' c:\Program Files\Griaule\GrFinger 4.1 FULL\samples\source\C#\GrFingerX\Util.cs 265 37 GrFingerXSampleC#

Anonymous
Rate this post:
0
No votes yet

OK, I got it myself
(Always the best support :-))

Change the definition of the handle

// Display fingerprint image on screen
public void PrintBiometricDisplay(bool isBiometric, GRConstants contextId)
{
// handle to finger image
//IPictureDisp handle = null;
System.Drawing.Image handle = null;

and then just use the handle
{
//_pbPic.Image = GrFingerXSampleCS.ImageConverter.IpictureToImage(handle);
_pbPic.Image = handle;