Несоответствие типов в компоненте java invoke com, использующем jacob
com метод:
VARIANT_BOOL SSR_GetUserTmp([in]LONG dwMachineNumber,[in]BSTR dwEnrollNumber,
* [in]LONG dwFingerIndex,[out]BYTE* TmpData,[out]LONG* TmpLength
)
код в Java:
public Map<String,Object> getUserTmpEx(String badgenumber, int index) {
Map<String,Object> temp = new HashMap<>();
Variant machingNumber = new Variant(MACHINE_NUMBER,true);
Variant enrollNumber = new Variant(badgenumber,true);
Variant fingureIndex = new Variant(index,true);
Variant flag = new Variant(0,true);
//below line is the type mismathch error happened.
Variant tmpData = new Variant(0,true);
Variant length = new Variant(0,true);
boolean result = false;
result = zkem.invoke(GET_USERTMPEX,
machingNumber,
enrollNumber,
fingureIndex,
flag,
tmpData,
length
).getBoolean();
log.debug(result+"");
return temp;
}