0

在数字角色模板上运行指纹验证程序时,我不断收到以下错误。我现在不知所措了。我的知识很短,我没有可以求助的人。你能帮忙吗?

错误信息

Test17.exe raised EacessViolation with message;Access violation at address 004033B7E in module ‘Test17.exe’

用于验证的 DELPHI 5 代码

procedure TFormVerify.DPFPVerificationControl1Complete(Sender: TObject;
  const pFeatureSet, pStatus: IDispatch);
var
  lStr, Str1,Str2       : AnsiString;           //Deserialize method
  lByteArray            : Variant;
  lArrayPointer         : Pointer;
  DPFPTemplate          : TDPFPTemplate;        //IDispatch;
  MFar                  : Integer;              //Long integer of result archieved
  MVerified             : Boolean;              //Result of whether finger has been verified or not
  MFeatureSet           : Variant;              //IDispatch, Variant;
  MTemplate             : Variant;              //IDispatch, Variant;
  MRes                  : Variant;              //TDPFPVerificationResult;
  oVerificationResult   : DPFPVerificationResult;
begin
  // Experiment
  MFeatureSet           := pFeatureSet;                 // Dispatch cast to Variant
  MTemplate             := Template;                    // Dispatch cast to Variant
  Str1                  := MfeatureSet.Serialize;   // Note string shows
  Str2                  := Mtemplate.Serialize;       // Note string shows
  try
    if (pFeatureSet=nil) or (Template=nil) then
      MessageDlg('Empty Featureset or Template!', mtInformation,[mbOk], 0)
    else
      Res := Ver.Verify(pFeatureSet, Template);          // ERROR MESSAGE
    MRes  := Res;
    MVerified     := MRes.Verified;                     
    MFar          := MRes.QueryInterface.FARAchieved;     DPFPVerificationResult1.FARAchieved;
  except
    on E: Exception do MessageDlg(E.Message +' : ' + IntToStr(E.HelpContext), mtInformation,[mbOk], 0);
  end;
4

2 回答 2

0

可能的原因:

(1)如果pFeatureSet或Template为nil,hten Res将是undefined,导致调用Res.Verified时异常

(2) MRes.QueryInterface 为零;

(3) DPFPVerificationResult1 为 nil

于 2010-11-16T05:10:45.637 回答
0
DPFPTemplate: DPFPFeatureSet;        //IDispatch;

MFeatureSet := pFeatureSet as DPFPFeatureSet;  // Dispatch cast to Variant
于 2020-10-05T16:27:20.437 回答