Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   UDF - Interbase 2007 SP2 y FireBird 2.1.3 (https://www.clubdelphi.com/foros/showthread.php?t=68974)

Neeruu 18-07-2010 21:49:06

UDF - Interbase 2007 SP2 y FireBird 2.1.3
 
Hola a todos...

Tengo un problema con una UDF que cree... y es que no puedo hacerla andar...

Error:

not found.invalid request BLR at offset 63.
function DESENCRYPTERTEXT is not defined.
module name or entrypoint could not be found.


Probe con Interbase 2007 SP2 y con firebird 2.1.3 64bit en Seven Ultimate 64bit
y con Interbase 2007 SP2 en XP SP3

y en todos tira el mismo error.....


Este es el codigo que tiene dentro la UDF

Código Delphi [-]
unit Encrypt_DesEncrypt;

interface

  Function DesEncrypterText(aStr: PChar): PChar; cdecl; export;
implementation


Function DesEncrypterText(aStr: PChar): PChar;
var aKey:Integer;
begin
   Result:='';
   for aKey:=1 to Length(aStr) do
       Result:=PChar(Chr(Byte(aStr[aKey])-1)+Result);
end;

end.

En el .dpr tengo el exports

Código Delphi [-]
library UDF_EncryptDesEncript;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }

uses
  SysUtils,
  Classes,
  Encrypt_DesEncrypt in Encrypt_DesEncrypt.pas;

exports
  DesEncrypterText;
  
begin
end.

Y el Script de Instalacion es el Siguiente:

Código SQL [-]
DECLARE EXTERNAL FUNCTION DESENCRYPTERTEXT 
    CSTRING (500)
    RETURNS CSTRING (500) FREE_IT
    ENTRY_POINT 'DesEncrypterText' MODULE_NAME 'UDF_EncryptDesEncript.dll';


Por favor alguien me podria decir porque no anda... en que estoy errando....


Desde ya muchas gracias....


Saluda Atte Neeruu... :)

PD:/ Ya cambie la configuración de Firebird y la dll esta en la carpeta UDF, reinicie el servicio y la maquina por las dudas tambien.....

Neeruu 18-07-2010 23:52:54

UDF - Interbase 2007 SP2 y FireBird 2.1.3
 
Hola a todos....

Con Interbase 2007 SP2 logre que ande.... como??? nose... solo volví a reiniciar el servicio y la udf anda....

Lo que si, es que no obtengo el resultado que quiero.....

Lo que debería hacer la función es pasarle un String y, la función lo desencrypta y me lo devuelve...... pero en ves de devolverme me daba como resultado caracteres raros.....


Saluda Atte Neeruu....:)

Neeruu 19-07-2010 04:11:25

UDF - Interbase 2007 SP2 y FireBird 2.1.3 Responder a Tema
 
Hola a todos....

Corregí mi UDF y ahora anda... o sea hace lo que quiero....

En XP SP3 con Interbase 2007 SP2 y WinSeven (64bit) con Interbase 2007 SP2 anda bien.....

Pero con Firebird 2.1.3 (64bit) y WinSeven (64bit) no anda.... sigo con el mismo error que no encuentra la librería.....

Estoy pensando que puede ser por la mezcla que hace Windows cuando es 64 bit.. que no esta encontrando la dll......


Si alguien sabe o tiene una idea de como solucionar esto.....


Saluda atte Neeruu... :)

Neeruu 20-07-2010 20:53:30

UDF - Interbase 2007 SP2 y FireBird 2.1.3
 
Hola a todos....

Compile la UDF(.dll) con lazarus para 64bit pero sigo con el mismo problema que no encuentra la librería o el punto de acceso....

Alguna idea de que puede ser....????

Saluda Atte Neeruu...:)

Neeruu 22-07-2010 02:29:09

UDF - Interbase 2007 SP2 y FireBird 2.1.3
 
Hola a todos....

Alguien esta trabajando con Firebird 2.1.3 64bit y con UDFs....

Por favor necesito una ayuda....


Saluda Atte Neeruu....:)


La franja horaria es GMT +2. Ahora son las 11:04:46.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi