I know my question may be funny. I use this function to identify registered fingerprint in database and this function is for the fingerprint sensor of "zkteco" company. This function is like this:
[Function]
public static int DBIdentify(IntPtr dbHandle, byte[] temp, ref int fid, ref int score)
[Purpose]
This function is used to conduct 1:N comparison.
[Parameter Description]
dbHandle
Cache handle
temp
Template used for comparison
fid
Returned fingerprint ID
score
Returned comparison score
[Return Value]
0 Succeeded
Others Failed (See the error code description.)
My problem is with this
IntPtr dbHandle
.
Please let me explain more, I am going to use this method to identify the fingerprint registered in the database, but I don't know how to put my database information in this temporary variable
IntPtr dbHandle
.
What I have tried:
I get the registered fingerprint string from my database with this:
int ret = zkfp.ZKFP_ERR_OK;
string RegTemplate;
int fid = 0, score = 0;
foreach (DataGridViewRow item in dataGridView1.Rows)
{
try
{
RegTemplate = item.Cells[0].Value.ToString();
byte[] FinalRegTemplate = zkfp2.Base64ToBlob(RegTemplate);
ret = zkfp2.DBIdentify(mDBHandle, FinalRegTemplate, ref fid, ref score);
}
catch
{}
Quote:
And my problem is with the first parameter of the "DBIdentify
" function.
Because the first parameter does not accept string
and I want to give it to the
IntPtr dbHandle
, but the variable does not accept the
string
and I don't know how to convert it and put it in this function:
public static int DBIdentify(IntPtr dbHandle, byte[] temp, ref int fid, ref int score)