Document.objSecuBSP.OpenDevice biometric issues

My problem is that we have a finger print device on secugen, but the problem occurs when I use the code there, I have all my drives installed. on the html side there is this code which meets "document.objSecuBSP.OpenDevice is not a function".

I found this link but it doesn't work.

here is the peak of the sneak code.

<html>
<head>
<title>Example of SecuGen SecuBSP SDK Pro COM Module</title>
</head>

<script lang=javascript>
<!--
function fnRegister()
{   
    var err, payload

    try // Exception handling
    {
        // Open device. [AUTO_DETECT]
        // You must open device before enrollment.
        DEVICE_FDP02        = 1;
        DEVICE_FDU02        = 2;
        DEVICE_FDU03        = 3;
        DEVICE_FDU04        = 4;
        DEVICE_FDU05        = 5;    // HU20
        DEVICE_AUTO_DETECT  = 255;

        document.objSecuBSP.OpenDevice(DEVICE_AUTO_DETECT);
        err = document.objSecuBSP.ErrorCode;    // Get error code
    alert(err+'s');
        if ( err != 0 )     // Device open failed
        {
            alert('Device open failed !');
            return;
        }

        // Enroll user fingerprint.
        document.objSecuBSP.Enroll(payload);
        err = document.objSecuBSP.ErrorCode;    // Get error code

        if ( err != 0 )     // Enroll failed
        {
            alert('Registration failed ! Error Number : [' + err + ']');
            return;
        }
        else    // Enroll success
        {
            // Get text encoded FIR data from SecuBSP module.
            document.bspmain.template1.value = document.objSecuBSP.FIRTextData;
            alert('Registration success !');
        }

        // Close device. [AUTO_DETECT]
        document.objSecuBSP.CloseDevice(DEVICE_AUTO_DETECT);

    }
    catch(e)
    {
        alert(e.message);
    }

    return;
}

function fnCapture()
{   
    var err

    try // Exception handling
    {
        // Open device. [AUTO_DETECT]
        // You must open device before capture.
        DEVICE_FDP02        = 1;
        DEVICE_FDU02        = 2;
        DEVICE_FDU03        = 3;
        DEVICE_FDU04        = 4;
        DEVICE_FDU05        = 5;        // HU20

        DEVICE_AUTO_DETECT  = 255;

        document.objSecuBSP.OpenDevice(DEVICE_AUTO_DETECT);
        err = document.objSecuBSP.ErrorCode;    // Get error code

        if ( err != 0 )     // Device open failed
        {
            alert('Device open failed !');
            return;
        }

        // Enroll user fingerprint.
        document.objSecuBSP.Capture();
        err = document.objSecuBSP.ErrorCode;    // Get error code

        if ( err != 0 )     // Enroll failed
        {
            alert('Capture failed ! Error Number : [' + err + ']');
            return;
        }
        else    // Capture success
        {
            // Get text encoded FIR data from SecuBSP module.
            document.bspmain.template2.value = document.objSecuBSP.FIRTextData;
            alert('Capture success !');
        }

        // Close device. [AUTO_DETECT]
        document.objSecuBSP.CloseDevice(DEVICE_AUTO_DETECT);

    }
    catch(e)
    {
        alert(e.message);
    }

    return;
}

function fnVerify()
{   
    var err
    var str1 = document.bspmain.template1.value;
    var str2 = document.bspmain.template2.value;

    try // Exception handling
    {
        // Verify fingerprint.
        document.objSecuBSP.VerifyMatch(str1, str2);
        err = document.objSecuBSP.ErrorCode;

        if ( err != 0 )
        {
            alert('Verification error ! Error Number : [' + err + ']');
        }
        else
        {
            if ( document.objSecuBSP.IsMatched == 0 )
                alert('Verification failed !');
            else
                alert('Verification success !');
        }
    }
    catch(e)
    {
        alert(e.message);
    }

    return;
}
// -->

</script>

<body>
<h4><b>Example of SecuGen SecuBSP SDK Pro COM Module</b></h4>
<p></p>

<form name=bspmain>

<input type=button name=btnRegister value='Register' OnClick='fnRegister();' style='width:100px'>
<br>
<input type=text name=template1 style='width:500px'>
<br>
<br>
<input type=button name=btnCapture value='Capture' OnClick='fnCapture();' style='width:100px'>
<br>
<input type=text name=template2 style='width:500px'>
<br>
<br>
<input type=button name=btnVerify value='Verify' OnClick='fnVerify();' style='width:100px'>
</form>

<OBJECT id=objSecuBSP style="LEFT: 0px; TOP: 0px" height=0 width=0 
    classid="CLSID:6283f7ea-608c-11dc-8314-0800200c9a66" 
    name=objSecuBSP VIEWASTEXT>
</OBJECT>

</BODY>
</HTML>

      

+3


source to share


1 answer


To enable biometric verification in the browser, you need to download the SDK from the official website: http://www.secugen.com/download/sdkrequest.htm

The SecuBSP SDK Pro manual says (see SecuBSP SDK Pro Manual.PDF ) that you need to install 2 DLL files on your computer:
  SecuBSPMx.DLL and SecuBSPMxCOM.DLL



The first Dll is the main module, and the second is a COM module that allows you to connect a reader device from a browser.

I highly recommend that you read Chapter 5. Chapter. SecuBSP COM Programming in ASP (on page # 47) in the PDF manual above as documentation. enter image description here

0


source







All Articles