TJOSE Ens

Registrado: 26 Nov 2002Mensajes: 42
|
Publicado: Jue 05 Dic, 2002 3:54 pm Asunto: Crear UDF |
|
|
Hola Foro
Estoy probando crear UDFs, el codigo siguiente muestra como lo hice:
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#pragma argsused
__declspec(dllexport) char * __cdecl Prueba(double &valor);
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
return 1;
}
char * __cdecl Prueba(double &valor)
{
String aux;
aux "+";
if(valor<0){
aux "-";
}
return aux.c_str();
}
en mi base la declaro como sigue:
DECLARE EXTERNAL FUNCTION TAM
DOUBLE PRECISION
RETURNS CSTRING(1)
ENTRY_POINT 'Prueba' MODULE_NAME 'MisUDFs'
y la uso de la siguiente forma:
select Legajo, nombre, tam(12) as Tamanio from alumnos
y se produce el siguiente error
Invalid token.
invalid request BLR at offset 74.
function TAM is not defined.
module name or entrypoint could not be found.
MisUDFs.dll se encuentra en el directorio bin y tambien en el UDF de
Firebird
Utilizo Firebird 1.0 _821
Saludos
TJOSE |
|