convert C++ to Delphi
C++
BYTE* savedMinData1 = new BYTE[FpLibXCapture.MinutiaeSize];
VARIANT varBuffer1;
varBuffer1.vt = VT_BYREF|VT_UI1;
varBuffer1.pbval = savedMinData1;
if (FpLibXCapture.LiveCapture(timeout, image_quality) == TRUE) {
if (FpLibXCapture.GetMinutiaeData(varBuffer1) == TRUE) {
// To do your code
}
}
Delphi
Const
register_quality = 50;
timeout = 6000;
Var
savedMinData1:PByteArray;
Buffer1: OleVariant;
begin
ReallocMemory(savedMinData1,FpLibXCapture1.MinutiaeSize);
TVariantArg(Buffer1).vt := VT_BYREF or VT_UI1;
TVariantArg(Buffer1).pbVal := Pointer(savedMinData1);
if (FpLibXCapture.LiveCapture(timeout, image_quality) = TRUE) then
if (FpLibXCapture.GetMinutiaeData(Buffer1) = TRUE) then
ShowMessage('OK')
else
ShowMessage('KO');
end;
question : why FpLibXCapture.GetMinutiaeData(Buffer1) value is FALSE or buffer1 value IS NULL ?
thax