[ trunka @ 13.08.2007. 15:41 ] @
Kada napisem UDF f-ju u Interbase na sledeci nacin:

declare external function MaxNo
double precision,
double precision
returns double precision by value
entry_point 'MaxNo' module_name 'audf_lib.dll'

javlja mi se greska :'invalid request BLR at offset 59
Function MaxNo is not define'

Pretpostavljam da ta funkcija ne postoji u datom .dll fajl-u.

U cemu je problem?
[ savkic @ 14.08.2007. 13:06 ] @
> javlja mi se greska :'invalid request BLR at offset 59
> Function MaxNo is not define'
> Pretpostavljam da ta funkcija ne postoji u datom .dll fajl-u.

Postoji li ili ne? Dalje pokušaj da naziv dll fajla napišeš bez ekstenzije. Gde ti se nalazi .dll fajl? Pokušaj da ga staviš u UDF poddir IBa.
[ darko_sudarov @ 15.08.2007. 15:45 ] @
Taj udf nisam koristio(min i max svakako vec postoje) ali probaj nesto ovako:

DECLARE EXTERNAL FUNCTION ABS
DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'IB_UDF_abs' MODULE_NAME 'ib_udf';


takodje stoji u dokumentaciji:

InterBase provides a number of often-needed functions in the form of a UDF library,which is named ib_udf.dll
on Windows platforms and ib_udf on UNIX platforms. This library is in interbase_home/lib. These UDFs are all implemented using the standard C library. This section describes each UDF and provides its declaration.
IMPORTANT
Do not move the ib_udf file from its installed location unless you also move the
ib_util.dll file, located in the same directory. The ib_udf file requires the ib_util file to
function correctly.
There is a script,
ib_udf.sql
, in the
interbase_home
/
examples/udf
subdirectory that declares
all of the functions listed below. If you want to declare only a subset of these, copy and
edit the script file.
IMPORTANT
Several of these UDFs must be called using the new
FREE_IT
keyword if—and only if—
they are written in thread-safe form, using
malloc
to allocate dynamic memory.
Note
When trigonometric functions are passed inputs that are out of bounds, they return
zero rather than NaN.