Ver Mensaje Individual
  #1  
Antiguo 18-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 513
Reputación: 19
Neeruu Va por buen camino
Cool 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.....
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita