How to use ftrScanAPI.dll in Delphi
<p>I'm having problem on how to correctly use ftrScanAPI.dll. I got no errors when calling the function "ftrScanOpenDevice" inside the DLL but I get errors "access violation" when calling the procedure "ftrScanCloseDevice". I'm stuck and don't know if I'm on the right track. Am I doing it correctly? </p>

<pre><code>TProcedure = procedure; stdcall;
TProcedure_int = procedure(A_Int : Integer); stdcall;


  TFutronicFingerPrint = class
    fHandle : THandle;
    public
      constructor Create;
      destructor Destroy; override;
      procedure Open;
      procedure Close;
  end;

constructor TFutronicFingerPrint.Create;
begin
    inherited;
    fHandle := LoadLibrary('ftrScanAPI.dll');
end;

destructor TFutronicFingerPrint.Destroy;
begin
  FreeLibrary(fHandle);
  inherited;
end;

procedure TFutronicFingerPrint.Open;
var
  procOpenDevice : TProcedure;
begin

    @procOpenDevice := GetProcAddress(fHandle, 'ftrScanOpenDevice');
    if @procOpenDevice &lt;&gt; nil then
    begin
       procOpenDevice;
    end;
end;

procedure TFutronicFingerPrint.Close;
var
  proc : TProcedure_int;
begin

    @proc := GetProcAddress(fHandle, 'ftrScanCloseDevice');
    if @proc &lt;&gt; nil then
    begin
       proc(fHandle);
    end;
end;
</code></pre>