SDK GRFINGER ACTIVEX - necessito ajuda

SDK GRFINGER ACTIVEX - necessito ajuda

Postby syda » Sun Dec 17, 2006 7:18 pm

baixei o SDK GrFinger para trabalhar com leitura de impressão digital (FINGERPRINT) com o leitor USB da Microsoft.

http://www.griaule.com/page/pt-br/grfinger_sdk

Estou com dificuldades em uma função para mostrar a imagem capturada.
Depois de alguns testes consegui apenas fazer a inicialização do controle:

// Carregando o Controle Activex
oFingerX = TActiveX():New( oWnd, "GrFingerX.GrFingerXCtrl")
oWnd:oClient = oFingerX
retVal1:=oFingerX:Do("Initialize")
//Criando o contexto
contextId:=0
retVal2:=oFingerX:Do("CreateContext",contextId)
//Inicializando a captura
retVal3:=oFingerX:Do("CapInitialize")
retVal4:=oFingerX:Do("CapStartCapture",'DPMS040802')

A próxima função a ser chamada é BiometricDisplay() mas não estou conseguindo, abaixo segue o sample em C oferecido pelo SDK. Como fazer em FW + xHarbour.com?

DECLARATION C#
int BiometricDisplay (ref Array tptQuery,ref Object rawImage, int width, int height, int hdc, ref stdole.IPictureDisp handle, int matchContext)

SAMPLE C#
public class TTemplate
{
// Template data.
public Array _tpt;
// Template size
public int _size;

public TTemplate(){
// Create a byte buffer for the template
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
}
}

// Raw image data type.
public struct TRawImage
{
// Image data.
public object img;
// Image width.
public int width;
// Image height.
public int height;
// Image resolution.
public int Res;
};

IPictureDisp handle = null;
// screen HDC
IntPtr hdc = GetDC(System.IntPtr.Zero);

_grfingerx.BiometricDisplay(ref _tpt._tpt, ref raw.img, _raw.width, _raw.height, _raw.Res,hdc.ToInt32(), ref handle,(int)contextId);

// draw image on picture box
if (handle != null)
{
_pbPic.Image = GrFingerXSampleCS.
ImageConverter.IpictureToImage(handle);
_pbPic.Update();
}
ReleaseDC(System.IntPtr.Zero,hdc);
FWH 7.04 + xHarbour.com xBuild 0.99.71
Resource Builder 2.6 (thanks to Rene for the indication)
Windows XP Professional
Manaus - Amazonas - Brasil
syda
 
Posts: 47
Joined: Sat Oct 08, 2005 9:12 pm

Postby Rochinha » Wed Dec 20, 2006 3:18 pm

Amiguinha

Voce tem MSN? ICQ? me envie.
Rochinha
 
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 134 guests