Ver Mensaje Individual
  #15  
Antiguo 11-04-2019
PEIIB PEIIB is offline
Miembro
 
Registrado: mar 2016
Posts: 21
Reputación: 0
PEIIB Va por buen camino
Sí, lo instalé ayer. Es el SDK. A partir de ahi pude instalar los ActiveX (inicialmente no sabía como pero ya esta solucionado).
El siguiente problema fue que los ejemplos en Delphi que vienen con el SDK, no funcionan en mi entorno. Debido a que los ejemplos estan programados en Delphi XE, y yo uso el anciano Delphi7.
Cambiando los uses, ya corre el programa.

El siguiente problema es: el programa de ejemplo corre, pero cuando le das al botón para capturar la firma me da el mensaje 'Error 103 unexpected code'.
Segun el servicio de Wacom, eso es debido a que faltaba una licencia.
De su web ya he bajado la licencia de evaluacion y la he introducido en el código, siguiendo sus instrucciones.
Ahora estoy en el punto que la ejecución del programa sigue dando el mismo 'Error 103 unexpected code' y eso que me he asegurado de haber introducido exactamente la misma licencia.
Estoy esperando respuesta del servicio técnico a ver que proponen.

Cuando tenga un momento voy a revisar la documentacion del SDK a ver si encuentro mas detalles sobre el error 103. En estos momentos no puedo: ayer perdí todo el día con este tema y no puedo permitirme tanto tiempo 'sin producir' tengo otros proyectos entre manos.
En fin, De un pad que se compro que teoricamente no necesitava Driver, resulta que sí que lo necesita, y ademas necesita una licencia. ¿Que pasara cuando expire la licencia de evaluacion? supongo pagar.
Muy mal resultado me esta dando esta maldita tableta de firmas. EL cliente quiso ahorarse un dinero con ella (modelo antiguo) y la diferencia la estoy pagando yo con creces (en horas de investigacion)

Adjunto el código del programa ejemplo, por si quereis echar un vistazo, o si podeis echar una mano:

Código Delphi [-]
procedure TForm1.FormShow(Sender: TObject);
var  LicPart1, LicPart2, LicPart3, LicPart4: String;  //La llicència que m'han subministrat, en tres parts perque ocupa més de 255 caràcters
begin
  LicPart1:= 'eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJMTVMiLCJleHAiOjE1NjI3NTQwMzcsImlhdCI6MTU1NDg5MTYzNy  wicmlnaHRzIjpbIlNJR19TREtfQ09SRSIsIlRPVUNIX1NJR05BVFVSRV9FTkFCTEVEIiwiU0lHQ0FQVFhfQUNDRVNTIiwiU0lHX1  NES19JU08iLCJTSUdfU0RLX0VOQ1JZUFR';
  LicPart2:= 'JT04iXSwiZGV2aWNlcyI6W10sInR5cGUiOiJldmFsIiwibGljX25hbWUiOiJXSUxMX1NES19mb3Jfc2lnbmF0dXJlIiwid2Fjb2  1faWQiOiJjNWUyZmJlNzg1YTQ0ZjhkYmZmNjQ3Mjk3MWY4Yzc4MSIsImxpY191aWQiOiJiNmZmZmQ4MC1mMjBmLTQ3YjQtOTcxMi  1jY2I1ODZlZDBhMGQiLCJhcHBzX3dpbmR';
  LicPart3:= 'vd3MiOltdLCJhcHBzX2lvcyI6W10sImFwcHNfYW5kcm9pZCI6W10sIm1hY2hpbmVfaWRzIjpbXX0.exUPv4JwsLuyHr05KLZQJe  8AzffUazabeq0M8P8hZH_ziYeqguNtt_Jv2Lczn0-HYjxsckeHBw6mUbQ16GQRQuIoct1VzEg21qDka3kSUayzaSuJqul1Ywd9xB381eQ-PA1C9RIj2aQHBdulaSAzoEUCA40';
  LicPart4:= '_8AYEyGx6oYkOkDZ2h4eVErCiEp8bnUMJbPVzdL8HWc8qOWMGoRtCMvQ13CNHys0L1bZz_frzznv3_7Ppcs0af1uAWjiHqnNDKZ  fmV0B31NwF0qk0N7P96EwrnjyueheEd8jDSIMH0LN90KqhYoipYBNTAC3P49yitGIdSoP6d7WTnmw6jRx03VcTIQ';
  SigCtl1.Licence := LicPart1 + LicPart2 + LicPart3 + LicPart4;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  sigCtl: TSigCtl;
  res: CaptureResult;
  sigObj1: SigObj;
  fileName: String;
begin
  Memo1.Lines.Add('btnSign was pressed');
  sigCtl := TSigCtl.Create(Self);
  res := sigCtl.Capture('Who', 'Why');
  if res = CaptureOK then
  begin
    Memo1.Lines.Add('Signature captured successfully');
    fileName := 'sig1.bmp';
    sigObj1 := SigObj(sigCtl.Signature);
    sigObj1.ExtraData['AdditionalData'] := 'Delphi test: Additional data';
    sigObj1.RenderBitmap(fileName, 200, 150, 'image/bmp', 0.5, $ff0000, $ffffff, -1.0, -1.0, RenderOutputFilename or RenderColor32BPP or RenderEncodeData);
    Image1.Picture.LoadFromFile(fileName);
  end
  else
  begin
    Memo1.Lines.Add('Signature capture error res='+IntToStr(res));
    case res of
    CaptureCancel: begin Memo1.Lines.Add('Signature cancelled'); end;
    CaptureError: begin Memo1.Lines.Add('No capture service available'); end;
    CapturePadError: begin Memo1.Lines.Add('Signing device error'); end;
    else begin Memo1.Lines.Add('Unexpected error code'); end;
    end;
  end;
end;

En cuanto tenga mas información, la pongo aquí, por si puede ayudar a alguien en el futuro.

Última edición por Casimiro Notevi fecha: 11-04-2019 a las 14:03:39. Razón: etiquetas delphi
Responder Con Cita