GetGrFingerVersion DecodeBase64 EncodeBase64 InstallLicense IsBase64Encoding SetLicenseFolder
DecodeBase64
Decodes a Base64 template.
Prerequisites The template array must be already allocated. The recommended size is GR_MAX_SIZE_TEMPLATE bytes.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[in] encodedBuffer The template to be decoded.
[in] encodedSize The size in bytes of the supplied base64 template.
[out] decodedBuffer The byte array in which the decoded template will be stored.
[in,out] decodedSize [in] The maximum size in bytes of the byte array supplied.
[out] The size in bytes of the decoded template.
See also
Return codesDeclaration
C++ .NETint DecodeBase64 (ref byte[] encodedBuffer, int encodedSize, ref byte[] decodedBuffer, ref int decodedSize);
C#
int DecodeBase64 (ref Array encodedBuffer, int encodedSize, ref Array decodedBuffer, ref int decodedSize);
VB6
Function DecodeBase64 (ByRef encodedBuffer() As Byte, ByVal encodedSize As Long, ByRef decodedBuffer() As Byte, ByRef decodedSize As Long) As Long VB .NET
Function DecodeBase64 (ByRef encodedBuffer As Array, ByVal encodedSize As Integer, ByRef decodedBuffer As Array, ByRef decodedSize As Integer) As Integer Delphi
function DecodeBase64(var encodedBuffer: PSafeArray; encodedSize: integer; var decodedBuffer: PSafeArray; var decodedSize: integer): integer;
GetGrFingerVersion
Returns the Fingerprint SDK version and edition.
Prerequisites A valid license must exist on system.
Return On success, the Fingerprint SDK type code is returned. On failure, the appropriate error code is returned.
Parameters
[out] majorVersion The Fingerprint SDK major version.
[out] minorVersion The Fingerprint SDK minor version.
See also
Licensing constants
Declaration
C++ .NETint GetGrFingerVersion(ref byte majorVersion, ref byte minorVersion) C#
int GetGrFingerVersion(ref Byte majorVersion, ref Byte minorVersion) VB6
Function GetGrFingerVersion(ByRef majorVersion As Byte, ByRef minorVersion As Byte) As Long VB .NET
Function GetGrFingerVersion(ByRef majorVersion As Byte, ByRef minorVersion As Byte) As Long Delphi
Function GetGrFingerVersion(majorVersion, minorVersion: Byte): integer;
Sample Code
C++ .NETunsigned char majorVersion=0, minorVersion=0;
String *vStr = new String("");
int result = _grfingerx->GetGrFingerVersion(&majorVersion, &minorVersion);
if (result == GRFINGER_FULL)
vStr = new String("IDENTIFICATION");
else if(result == GRFINGER_LIGHT) vStr = new String("VERIFICATION");
else if(result == GRFINGER_FREE) vStr = new String("FREE");
MessageBox::Show(System::String::Concat(System::String::Concat("The Fingerprint SDK DLL version is ", Convert::ToString(majorVersion) , "." , Convert::ToString(minorVersion)), System::String::Concat(". \n", "The license type is '", vStr, "'.")),"Fingerprint SDK Version");
C#
byte majorVersion=0,minorVersion=0;
GRConstants result;
string vStr = "";
result = (GRConstants)_grfingerx.GetGrFingerVersion(ref majorVersion, ref minorVersion);
if(result == GRConstants.GRFINGER_FULL) vStr = "IDENTIFICATION";
else if(result == GRConstants.GRFINGER_LIGHT) vStr = "VERIFICATION";
else if(result == GRConstants.GRFINGER_FREE) vStr = "FREE";
MessageBox.Show("The Fingerprint SDK DLL version is " + majorVersion + "." + minorVersion + ". \n" +
"The license type is '" + vStr + "'.","Fingerprint SDK Version");
VB6
Dim majorVersion As Byte Dim minorVersion As Byte Dim ret As Long Dim vStr As String
majorVersion = 0 minorVersion = 0 vStr = ""
ret = GrFingerX.GetGrFingerVersion(majorVersion, minorVersion) If ret = GRFINGER_FULL Then vStr = "IDENTIFICATION"
If ret = GRFINGER_LIGHT Then vStr = "VERIFICATION"
If ret = GRFINGER_FREE Then vStr = "FREE"
Call MsgBox("The Fingerprint SDK DLL version is " & majorVersion & _ "." & minorVersion & "." & vbCrLf & _
"The license type is '" & vStr & "'.", , "Fingerprint SDK Version")
VB .NET
Dim majorVersion As Integer = 0 Dim minorVersion As Integer = 0 Dim result As GRConstants Dim vStr As String = ""
result = _GrFingerX.GetGrFingerVersion(majorVersion, minorVersion) If result = GRConstants.GRFINGER_FULL Then vStr = "IDENTIFICATION"
If result = GRConstants.GRFINGER_LIGHT Then vStr = "VERIFICATION"
If result = GRConstants.GRFINGER_FREE Then vStr = "FREE"
MessageBox.Show("The Fingerprint SDK DLL version is " & majorVersion & _ "." & minorVersion & "." & vbCrLf & _
"The license type is '" & vStr & "'.", "Fingerprint SDK Version") End Sub
result := GrFingerXCtrl1.GetGrFingerVersion(majorVersion, minorVersion);
If result = GRFINGER_FULL Then vStr := 'IDENTIFICATION';
If result = GRFINGER_LIGHT Then vStr := 'VERIFICATION';
If result = GRFINGER_FREE Then vStr := 'FREE';
Application.MessageBox(PChar('The Fingerprint SDK DLL version is ' + intToStr(majorVersion) + '.' + intToStr(minorVersion) + '.' + #13#10 + 'The license type is ''' + vStr + '''.'), PChar('Fingerprint SDK version'), MB_OK);
End;
IsBase64Encoding
Verifies if a buffer is in Base64 format.
Return True if the supplied buffer is in Base64 format. Otherwise, False is returned.
Parameters
[in] buffer The buffer to be verified.
[in] bufferSize The size in bytes of the supplied buffer.
Declaration
C++ .NETbool IsBase64Encoding (ref byte[] buffer, int bufferSize);
C#
bool IsBase64Encoding (ref Array buffer, int bufferSize);
VB6
Function IsBase64Encoding (ByRef buffer() As Byte, ByVal bufferSize As Long) As Boolean VB .NET
Function IsBase64Encoding (ByRef buffer As Array, ByVal bufferSize As Integer) As Boolean Delphi
function IsBase64Encoding(var buffer: PSafeArray; bufferSize: integer): boolean;
EncodeBase64
Encodes a template in Base64 format.
Prerequisites The template array must be already allocated. The recommended size is GR_MAX_SIZE_TEMPLATE bytes.
Return On success, the template quality code is returned. On failure, the appropriate error code is returned.
Parameters
[in] buffer The template to be encoded.
[in] bufferSize The size in bytes of the supplied template.
[out] encodedBuffer The byte array in which the encoded template will be stored.
[in,out] encodedSize [in] The maximum size in bytes of the byte array supplied.
[out] The size in bytes of the encoded template.
See also
Return codesDeclaration
C++ .NETint EncodeBase64 (ref byte[] buffer, int bufferSize, ref byte[] encodedBuffer, ref int encodedSize);
C#
int EncodeBase64 (ref Array buffer, int bufferSize, ref Array encodedBuffer, ref int encodedSize);
VB6
Function EncodeBase64 (ByRef buffer() As Byte, ByVal bufferSize As Long, ByRef encodedBuffer() As Byte, ByRef encodedSize As Long) As Long VB .NET
Function EncodeBase64 (ByRef buffer As Array, ByVal bufferSize As Integer, ByRef encodedBuffer As Array, ByRef encodedSize As Integer) As Integer Delphi
function EncodeBase64(var buffer: PSafeArray; bufferSize: integer; var encodedBuffer: PSafeArray; var encodedSize: integer): integer;
InstallLicense
Installs a license based on the product key.
Prerequisites This method must be called before the initialization of the library.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[in] productKey the Product Key.
See also
Return codesDeclaration
C++ .NETint InstallLicense (string productKey) C#
int InstallLicense (string productKey)
VB6
Function InstallLicense (ByVal productKey As String) VB .NET
Function InstallLicense (ByVal productKey As String) Delphi
function InstallLicense(const productKey: WideString): integer;
SetLicenseFolder
Sets the directory in which Fingerprint SDK must search for its runtime license file.
This is an optional function. Please, read "Licensing Fingerprint SDK Based Deployed Applications" section to know how Fingerprint SDK searchs for the license file.
Prerequisites This method must be called before the initialization of the library.
Return On success, GR_OK is returned.On failure, the appropriate error code is returned.
Parameters
[in] licenseFolder the directory where the Fingerprint SDK runtime license file is located.
See also
Return codesDeclaration
C++ .NETint SetLicenseFolder (string licenseFolder)
C#
int SetLicenseFolder (string licenseFolder)
VB6
Function SetLicenseFolder (ByVal licenseFolder As String) VB .NET
Function SetLicenseFolder (ByVal licenseFolder As String)
Delphi
function SetLicenseFolder(const licenseFolder: WideString): integer;
Events
All events fired by ActiveX components are synchronized. This means that an event is fired only after any other event already fired finishes. Code events carefully to avoid race and deadlock conditions in your application.
SensorPlug SensorUnplug FingerDown FingerUp ImageAcquired
SensorPlug
This event is fired whenever a fingerprint reader is plugged into the computer.
Prerequisites The capture module must have been previously initialized.At least one fingerprint reader must be connected and working.
Parameters
[in] idSensor The ID of the fingerprint reader that raised the event.
Declaration
C++ .NETvoid [Control Name]_SensorPlug(System::Object * sender, _IGrFingerXCtrlEvents_SensorPlugEvent * e) C#
void [Control Name]_SensorPlug(object sender, [Library Name]._IGrFingerXCtrlEvents_SensorPlugEvent e)
VB6
Sub [Control Name]_SensorPlug(ByVal idSensor As String) VB .NET
Sub [Control Name]_SensorPlug(ByVal sender As System.Object, ByVal e As [Library Name]._IGrFingerXCtrlEvents_SensorPlugEvent) Handles [Control Name].SensorPlug Delphi
procedure [Control Name]SensorPlug(Sender: TObject; const idSensor: WideString);
Sample Code
C++ .NET// A fingerprint reader was plugged on system
private: System::Void axGrFingerXCtrl2_SensorPlug(System::Object * sender, _IGrFingerXCtrlEvents_SensorPlugEvent * e) { WriteLog(String::Concat("Sensor: " , e->idSensor , ". Event: Plugged."));
axGrFingerXCtrl2->CapStartCapture(e->idSensor);
}
C#
// A fingerprint reader was plugged on system
private void axGrFingerXCtrl1_SensorPlug(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_SensorPlugEvent e) {
WriteLog("Sensor: " + e.idSensor + ". Event: Plugged.");
axGrFingerXCtrl1.CapStartCapture(e.idSensor);
}
VB6
' A fingerprint reader was plugged on system
Private Sub GrFingerXCtrl1_SensorPlug(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". Event: Plugged.") GrFingerXCtrl1.CapStartCapture (idSensor)
End Sub
VB .NET
' A fingerprint reader was plugged on system
Private Sub AxGrFingerXCtrl1_SensorPlug(ByVal sender As System.Object, ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_SensorPlugEvent) Handles AxGrFingerXCtrl1.SensorPlug WriteLog("Sensor: " & e.idSensor & ". Event: Plugged.")
AxGrFingerXCtrl1.CapStartCapture(e.idSensor) End Sub
Delphi
// A fingerprint reader was plugged on system procedure TGrFingerXCtrl1SensorPlug(Sender: TObject;
const idSensor: WideString);
begin
writeLog ('Sensor: ' + idSensor + '. Event: Plugged.');
GrFingerXCtrl1.CapStartCapture (idSensor);
end;
SensorUnplug
This event is fired whenever a fingerprint reader is unplugged from the computer.
Prerequisites The capture module must have been previously initialized.
At least one fingerprint reader must be connected, working and recognized as plugged by the capture module.
Parameters
[in] idSensor The ID of the fingerprint reader that raised the event.
Declaration
C++ .NETvoid [Control Name]_SensorUnplug(System::Object * sender, _IGrFingerXCtrlEvents_SensorUnplugEvent * e) C#
void [Control Name]_SensorUnplug(object sender, [Library Name]._IGrFingerXCtrlEvents_SensorUnplugEvent e) VB6
Sub [Control Name]_SensorUnplug(ByVal idSensor As String) VB .NET
Sub [Control Name]_SensorUnplug(ByVal sender As System.Object, ByVal e As [Library Name]._IGrFingerXCtrlEvents_SensorUnplugEvent) Handles [Control Name].SensorUnplug Delphi
procedure [Control Name]SensorUnplug(Sender: TObject; const idSensor: WideString);
Sample Code
C++ .NET// A fingerprint reader was unplugged on system
private: System::Void axGrFingerXCtrl2_SensorUnplug(System::Object * sender, _IGrFingerXCtrlEvents_SensorUnplugEvent * e) { WriteLog(String::Concat(S"Sensor: " , e->idSensor , ". Event: Unplugged."));
axGrFingerXCtrl2->CapStopCapture(e->idSensor);
}
C#
// A fingerprint reader was unplugged on system
private void axGrFingerXCtrl1_SensorUnplug(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_SensorUnplugEvent e) {
WriteLog("Sensor: " + e.idSensor + ". Event: Unplugged.");
axGrFingerXCtrl1.CapStopCapture(e.idSensor);
}
VB6
' A fingerprint reader was unplugged on system
Private Sub GrFingerXCtrl1_SensorUnplug(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". Event: Unplugged.") GrFingerXCtrl1.CapStopCapture (idSensor)
End Sub
VB .NET
' A fingerprint reader was unplugged on system
Private Sub AxGrFingerXCtrl1_SensorUnplug(ByVal sender As System.Object, ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_SensorUnplugEvent) Handles AxGrFingerXCtrl1.SensorUnplug WriteLog("Sensor: " & e.idSensor & ". Event: Unplugged.")
AxGrFingerXCtrl1.CapStopCapture(e.idSensor) End Sub
Delphi
// A fingerprint reader was unplugged on system procedure TGrFingerXCtrl1SensorUnplug(Sender: TObject;
const idSensor: WideString);
begin
writeLog ('Sensor: ' + idSensor + '. Event: Unplugged.');
GrFingerXCtrl1.CapStopCapture (idSensor);
end;
FingerDown
This event is fired whenever a finger is placed over a plugged fingerprint reader.
Prerequisites The capture module must have been previously initialized.At least one fingerprint reader started capturing fingerprint images.
Parameters
[in] idSensor The ID of the fingerprint reader that raised the event.
Declaration
C++ .NETvoid [Control Name]_FingerDown(System::Object * sender, _IGrFingerXCtrlEvents_FingerDownEvent * e) C#
void [Control Name]_FingerDown(object sender, [Library Name]._IGrFingerXCtrlEvents_FingerDownEvent e) VB6
Sub [Control Name]_FingerDown(ByVal idSensor As String) VB .NET
Sub [Control Name]_FingerDown(ByVal sender As System.Object, ByVal e As [Library Name]._IGrFingerXCtrlEvents_FingerDownEvent) Handles [Control Name].FingerDown Delphi
procedure [Control Name]FingerDown(Sender: TObject; const idSensor: WideString);
Sample Code
C++ .NET// A finger was placed over the reader
private: System::Void axGrFingerXCtrl2_FingerDown(System::Object * sender, _IGrFingerXCtrlEvents_FingerDownEvent * e) { WriteLog(String::Concat(S"Sensor: " , e->idSensor , ". Event: Finger Placed."));
}
C#
// A finger was placed over the reader
private void axGrFingerXCtrl1_FingerDown(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_FingerDownEvent e) {WriteLog("Sensor: " + e.idSensor + ". Event: Finger Placed.");
}
VB6
' A finger was placed over the reader
Private Sub GrFingerXCtrl1_FingerDown(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". Event: Finger Placed.") End Sub
VB .NET
' A finger was placed over the reader
Private Sub AxGrFingerXCtrl1_FingerDown(ByVal sender As System.Object, ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_FingerDownEvent) Handles AxGrFingerXCtrl1.FingerDown WriteLog("Sensor: " & e.idSensor & ". Event: Finger Placed.")
End Sub
Delphi
// A finger was placed over the reader
procedure TGrFingerXCtrl1FingerDown(Sender: TObject;
const idSensor: WideString);
begin
writeLog ('Sensor: ' + idSensor + '. Event: Finger Placed.');
end;
FingerUp
This event is fired whenever a finger is removed from a plugged fingerprint reader.
Prerequisites The capture module must have been previously initialized.At least one fingerprint reader started capturing fingerprint images.
Parameters
[in] idSensor The ID of the fingerprint reader that raised the event.
Declaration
C++ .NETvoid [Control Name]_FingerUp(System::Object * sender, _IGrFingerXCtrlEvents_FingerUpEvent * e) C#
void [Control Name]_FingerUp(object sender, [Library Name]._IGrFingerXCtrlEvents_FingerUpEvent e) VB6
Sub [Control Name]_FingerUp(ByVal idSensor As String) VB .NET
Sub [Control Name]_FingerUp(ByVal sender As System.Object, ByVal e As [Library Name]._IGrFingerXCtrlEvents_FingerUpEvent) Handles [Control Name].FingerUp Delphi
procedure [Control Name]FingerUp(Sender: TObject; const idSensor: WideString);
Sample Code
C++ .NET// A finger was removed over the reader
private: System::Void axGrFingerXCtrl2_FingerUp(System::Object * sender, _IGrFingerXCtrlEvents_FingerUpEvent * e) { WriteLog(String::Concat(S"Sensor: " , e->idSensor , ". Event: Finger removed."));
}
C#
// A finger was removed over the reader
private void axGrFingerXCtrl1_FingerUp(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_FingerUpEvent e) {
WriteLog("Sensor: " + e.idSensor + ". Event: Finger removed.");
}
VB6
' A finger was removed over the reader
Private Sub GrFingerXCtrl1_FingerUp(ByVal idSensor As String) writeLog ("Sensor: " & idSensor & ". Event: Finger removed.") End Sub
VB .NET
' A finger was removed over the reader
Private Sub AxGrFingerXCtrl1_FingerUp(ByVal sender As System.Object, ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_FingerUpEvent) Handles AxGrFingerXCtrl1.FingerUp WriteLog("Sensor: " & e.idSensor & ". Event: Finger removed.")
End Sub
Delphi
// A finger was removed over the reader procedure TGrFingerXCtrl1FingerUp(Sender: TObject;
const idSensor: WideString);
begin
writeLog ('Sensor: ' + idSensor + '. Event: Finger removed.');
end;
ImageAcquired
This event is fired whenever a fingerprint image is acquired from a plugged fingerprint reader.
Prerequisites The capture module must have been previously initialized.At least one fingerprint reader started capturing fingerprint images.
Parameters
[in] idSensor The ID of the fingerprint reader that raised the event.
[in] width Fingerprint image width in pixels.
[in] height Fingerprint image height in pixels.
[in] rawImage The raw grayscale fingerprint image.
[in] res Fingerprint image resolution in DPI.
See also
Fingerprint Image Format
Declaration
C++ .NET
void [Control Name]_ImageAcquired(System::Object * sender, _IGrFingerXCtrlEvents_ImageAcquiredEvent * e) C#
void [Control Name]_ImageAcquired(object sender, [Library Name]._IGrFingerXCtrlEvents_ImageAcquireEvent e) VB6
Sub [Control Name]_ImageAcquired(ByVal idSensor As String, ByVal width As Long, ByVal height As Long, rawImage As Variant, ByVal res As Long) VB .NET
Sub [Control Name]_ImageAcquired(ByVal sender As System.Object, ByVal e As [Library Name]._IGrFingerXCtrlEvents_ImageAcquiredEvent) Handles [Control Name].ImageAcquired Delphi
procedure [Control Name]ImageAcquired(Sender: TObject; const dSensor: WideString; width, height: Integer; var rawImage: OleVariant; res: Integer);
Sample Code
C++ .NETprivate: System::Void axGrFingerXCtrl2_ImageAcquired(System::Object * sender, _IGrFingerXCtrlEvents_ImageAcquiredEvent * e) { // Copying acquired image
_raw->img = e->rawImage;
_raw->height = e->height;
_raw->width = e->width;
_raw->Res = e->res;
// Signaling that an Image Event occurred.
WriteLog(String::Concat(S"Sensor: ", Convert::ToString(e->idSensor), S". Event: Image captured."));
// display the fingerprint image
PrintBiometricDisplay(false, GR_DEFAULT_CONTEXT);
}
C#
private void axGrFingerXCtrl1_ImageAcquired(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_ImageAcquiredEvent e) {
// Copying acquired image _raw.img = e.rawImage;
_raw.height = (int) e.height;
_raw.width = (int) e.width;
_raw.Res = e.res;
// Signaling that an Image Event occurred.
WriteLog("Sensor: " + e.idSensor + ". Event: Image captured.");
// display the fingerprint image
PrintBiometricDisplay(false, GRConstants.GR_DEFAULT_CONTEXT);
}
VB6
Private Sub GrFingerXCtrl1_ImageAcquired(ByVal idSensor As String, ByVal width As Long, ByVal height As Long, rawImage As Variant, ByVal res As Long) ' Copying acquired image
With raw .img = rawImage .height = height .width = width .res = res End With
' Signaling that an Image Event occurred.
writeLog ("Sensor: " & idSensor & ". Event: Image captured.") ' display the fingerprint image
Call PrintBiometricDisplay(False, GR_DEFAULT_CONTEXT) End Sub
VB .NET
Private Sub AxGrFingerXCtrl1_ImageAcquired(ByVal sender As System.Object, ByVal e As AxGrFingerXLib._IGrFingerXCtrlEvents_ImageAcquiredEvent) Handles AxGrFingerXCtrl1.ImageAcquired ' Copying acquired image
raw.height = e.height raw.width = e.width raw.res = e.res raw.img = e.rawImage
' Signaling that an Image Event occurred.
WriteLog("Sensor: " & e.idSensor & ". Event: Image captured.") ' display the fingerprint image
PrintBiometricDisplay(False, GRConstants.GR_DEFAULT_CONTEXT) End Sub
Delphi
procedure TGrFingerXCtrl1ImageAcquired(Sender: TObject;
const idSensor: WideString; width, height: Integer;
var rawImage: OleVariant; res: Integer);
begin
// Copying acquired image raw.height := height;
raw.width := width;
raw.res := res;
raw.img := rawImage;
// Signaling that an Image Event occurred.
writeLog ('Sensor: ' + idSensor + '. Event: Image captured.');
// display the fingerprint image
PrintBiometricDisplay(false, GR_DEFAULT_CONTEXT);
end;