unit fpengine;

interface

uses Windows,Messages, SysUtils, Variants,FMTBcd;

///////////////////////////////////////////////////////////////////////////////////////////////////
const
  FPDATASIZE=256;
  IMGWIDTH=256;
  IMGHEIGHT=288;
  IMGSIZE=73728;
///////////////////////////////////////////////////////////////////////////////////////////////////
  WM_FPMESSAGE=WM_USER+120;
  FPM_DEVICE=$01;
  FPM_PLACE=$02;
  FPM_LIFT=$03;
  FPM_CAPTURE=$04;
  FPM_ENROLL=$06;
  FPM_GENCHAR=05;
  FPM_NEWIMAGE=$07;
  FPM_TIMEOUT=$08;

  RET_OK:Integer=1;
  RET_FAIL:Integer=0;

///////////////////////////////////////////////////////////////////////////////////////////////////
procedure SetMsgMainHandle(hWnd:Integer);stdcall;external 'fpengine.dll';
function OpenDevice(nPortNum:integer;nPortPara:integer;nDeviceType:integer):Integer;stdcall; external 'fpengine.dll';
function LinkDevice(pw:Integer): Integer;stdcall; external 'fpengine.dll';
function CloseDevice(): Integer;stdcall; external 'fpengine.dll';

function DrawFingerImage(var imagedata:Byte;size,hdc,left,top:Integer):Integer;stdcall; external 'fpengine.dll';
function SetImage(var imagedata:Byte;wImageWidth,wImageHeight:Word):Integer;stdcall; external 'fpengine.dll';
function DrawImage(hdc,left,top:Integer):Integer;stdcall; external 'fpengine.dll';

procedure CaptureImage();stdcall;external 'fpengine.dll';
procedure CaptureTemplate();stdcall;external 'fpengine.dll';
procedure EnrollTemplate();stdcall;external 'fpengine.dll';

function GetWorkMsg():Integer;stdcall; external 'fpengine.dll';
function GetRetMsg():Integer;stdcall; external 'fpengine.dll';
function ReleaseMsg():Integer;stdcall; external 'fpengine.dll';

function GetTemplateByCap(var fpdata:Byte;var size:Integer):Integer;stdcall; external 'fpengine.dll';
function GetTemplateByEnl(var fpdata:Byte;var size:Integer):Integer;stdcall; external 'fpengine.dll';

function CreateTemplate(var pFingerData:Byte;var pTemplate:Byte): Integer;stdcall; external 'fpengine.dll';
function MatchTemplateOne(var pSrcData:Byte;var pDstData:Byte;dstsize:Integer): Integer;stdcall; external 'fpengine.dll';



implementation

end.
