Ver Mensaje Individual
  #10  
Antiguo 25-02-2019
Avatar de oscarac
[oscarac] oscarac is offline
Miembro Premium
 
Registrado: sep 2006
Ubicación: Lima - Perú
Posts: 2.010
Reputación: 20
oscarac Va por buen camino
Estuve avanzando un poco mas de acuerdo a lo que me enseñaste

Código Delphi [-]
unit FrmMain_f;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Grids, Vcl.DBGrids, zkemkeeper_TLB, dateutils;

type
  TForm1 = class(TForm)
    edtIp: TEdit;
    edtPort: TEdit;
    btnDispositivoLoad: TButton;
    dbgrd1: TDBGrid;
    mmoLOG: TMemo;
    lbl1: TLabel;
    procedure btnDispositivoLoadClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    Procedure LeerHuella;

    { Private declarations }
  public
      ZK1 : TCZKEM;
      procedure Log(aMsj : string);
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btnDispositivoLoadClick(Sender: TObject);
begin
  if not(ZK1.Connect_Net(EdtIP.Text, StrToInt(EdtPort.Text))) then
    begin
      lbl1.Caption := 'Error. No se pudo conectar';
      exit;
    end;
    if not ZK1.RegEvent(1, 65535) then  //65535
      lbl1.Caption := 'Error RegEvent';

end;

procedure TForm1.FormCreate(Sender: TObject);
Var Huella : TCZKEM;
begin
  Huella := TCZKEM.Create(nil);  // creo el componente
  Huella.OnFinger := LeerHuella;
end;

procedure TForm1.LeerHuella;
begin
 //
end;

procedure TForm1.Log(aMsj: string);
begin
  MmoLOG.Lines.Add(aMsj);
end;

end.

pero al compilar me aparece un error

[dcc32 Error] FrmMain_f.pas(143): E2009 Incompatible types: 'Parameter lists differ'

si voy al archivo zkemkeeper_TLB y busco OnFinger, su declaracion esta asi

Código Delphi [-]
    procedure OnFinger; dispid 8;

entonces no entiendo el porque del mensaje de error con parametros
__________________
Dulce Regalo que Satanas manda para mi.....
Responder Con Cita