Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 18-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Poder: 17
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
  #2  
Antiguo 18-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Poder: 17
Neeruu Va por buen camino
Cool 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....
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita
  #3  
Antiguo 19-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Poder: 17
Neeruu Va por buen camino
Cool 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...
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita
  #4  
Antiguo 20-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Poder: 17
Neeruu Va por buen camino
Cool 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...
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita
  #5  
Antiguo 22-07-2010
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 485
Poder: 17
Neeruu Va por buen camino
Cool 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....
__________________
Saluda Atte Neeruu!!! :)
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Conexion DELPHI 2007 con Firebird 2.1 MALBOTO22 Conexión con bases de datos 5 11-02-2010 14:29:49
Problema para borrar una tabla Interbase 2007 NPIdea Firebird e Interbase 1 27-10-2008 09:11:36
Problemas con Boolean en Interbase 2007 NPIdea Firebird e Interbase 3 21-10-2008 14:11:19
Firebird y Delphi 2007 JosepGA Conexión con bases de datos 10 13-02-2008 12:59:20
Interbase 2007 y Windows 98? Mauro Daniel Firebird e Interbase 2 03-08-2007 16:15:08


La franja horaria es GMT +2. Ahora son las 08:38:22.


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
Copyright 1996-2007 Club Delphi