Amigos ncfisa y neftali
Voy a ser un poco mas claro con ustedes, tengo unas SDK de identificación biometrica pero funciona guardando las huellas o templates en archivos, pero me gustaria manejarlo con Base de Datos, por eso creo conveniente cambiar lla variable File por TMemoryStream o cualquiera que ustedes me recomienden. aqui les dejo un Ejm del codigo :
Código Delphi
[-]
var
fPtr: file;
lpRec: LPDBREC;
dSize: DWORD;
rdTotal: Integer;
begin
AssignFile( fPtr, fName );
Reset( fPtr, 1 );
BlockRead( fPtr, dSize, sizeof( DWORD ), rdTotal );
if rdTotal <> sizeof( DWORD ) then
begin
CloseFile( fPtr );
GetRecord := nil;
Exit;
end;
lpRec := AllocRecordMem( dSize );
BlockRead( fPtr, lpRec.key, sizeof( FTR_DATA_KEY ), rdTotal );
if rdTotal <> sizeof( FTR_DATA_KEY ) then
begin
CloseFile( fPtr );
FreeRecordMem( lpRec );
GetRecord := nil;
Exit;
end;
BlockRead( fPtr, PChar( lpRec.data )^, dSize, rdTotal );
if DWORD( rdTotal ) <> dSize then
begin
CloseFile( fPtr );
FreeRecordMem( lpRec );
GetRecord := nil;
Exit;
end;
CloseFile( fPtr );
GetRecord := lpRec;
end;