vfp中控指纹仪调用出错
*** ActiveX Control Event ***
LPARAMETERS actionresult
sTemp = thisform.OleControl1.EncodeTemplate1(thisform.OleControl1.GetTemplate())
If FMatchType = 1 Then
RegChanged = .F.
SELECT ls
ZAP
If thisform.OleControl1.VerFingerFromFile('c:\1.xxx', thisform.OleControl1.VerTplFileName, .F., @RegChanged)
APPEND BLANK
REPLACE ls1 WITH 1
REPLACE ls2 WITH '拇'
ELSE
APPEND BLANK
REPLACE ls1 WITH 0
REPLACE ls2 WITH '拇'
ENDIF
IF thisform.OleControl1.VerFingerFromFile('c:\2.xxx', thisform.OleControl1.VerTplFileName, .F., @RegChanged)
APPEND BLANK
REPLACE ls1 WITH 1
REPLACE ls2 WITH '食'
ELSE
APPEND BLANK
REPLACE ls1 WITH 0
REPLACE ls2 WITH '食'
ENDIF
IF thisform.OleControl1.VerFingerFromFile('c:\3.xxx', thisform.OleControl1.VerTplFileName, .F., @RegChanged)
APPEND BLANK
REPLACE ls1 WITH 1
REPLACE ls2 WITH '中'
ELSE
APPEND BLANK
REPLACE ls1 WITH 0
REPLACE ls2 WITH '中'
ENDIF
IF thisform.OleControl1.VerFingerFromFile('c:\4.xxx', thisform.OleControl1.VerTplFileName, .F., @RegChanged)
APPEND BLANK
REPLACE ls1 WITH 1
REPLACE ls2 WITH '无名'
ELSE
APPEND BLANK
REPLACE ls1 WITH 0
REPLACE ls2 WITH '无名'
ENDIF
IF thisform.OleControl1.VerFingerFromFile('c:\5.xxx', thisform.OleControl1.VerTplFileName, .F., @RegChanged)
APPEND BLANK
REPLACE ls1 WITH 1
REPLACE ls2 WITH '小拇'
ELSE
APPEND BLANK
REPLACE ls1 WITH 0
REPLACE ls2 WITH '小拇'
ENDIF
LOCATE FOR ls1=1
IF FOUND()
MessageBox(ALLTRIM(fingprin.xming)+'、'+ALLTRIM(fingprin.zfxming)+ALLTRIM(ls.ls2)+'指指纹比对成功!')
oSpeech = CreateObject("SAPI.SpVoice") &&连接到系统的语音功能
sWord=ALLTRIM(fingprin.xming)+ALLTRIM(fingprin.zfxming)+'指纹比对成功'
oSpeech.Speak(sWord) &&让系统读出字符串里的内容
oSpeech=NULL
Else
MessageBox(ALLTRIM(fingprin.xming)+'、'+ALLTRIM(fingprin.zfxming)+'指纹比对失败,请换手指重试!')
oSpeech = CreateObject("SAPI.SpVoice") &&连接到系统的语音功能
sWord=ALLTRIM(fingprin.xming)+ALLTRIM(fingprin.zfxming)+'指纹比对失败,请换手指重试!'
oSpeech.Speak(sWord) &&让系统读出字符串里的内容
oSpeech=NULL
EndIf
else
if FMatchType = 2 Then
Score = 8
ProcessNum = 0
fi = thisform.OleControl1.IdentificationFromFileInFPCacheDB(fpcHandle, thisform.OleControl1.VerTplFileName, @Score, @ProcessNum)
If fi = -1 Then
MessageBox(ALLTRIM(fingprin.xming)+'、'+ALLTRIM(fingprin.zfxming)+'指纹比对失败,请换手指重试!')
Else
MessageBox(ALLTRIM(fingprin.xming)+'、'+ALLTRIM(fingprin.zfxming)+'指纹比对成功!')
EndIf
endif
ENDIF
在OnCaptureToFile中执行蓝色部分出错“OLE错误码0x80004005 Unspecified error”,把蓝色代码放在command中,执行“click”thisform.command12.click出现同样错误。
请问各位版主问题出在何处?如何解决?