Subject | DLLS, UDFs, and Firebird |
---|---|
Author | Jonathan M. Freedman |
Post date | 2002-10-07T22:14:13Z |
I have created a DLL, using C++Builder 6 on windows xp professional,
compiling it with the C option on and multithreaded option on, it compiles
fine...it still does not work with Firebird (1.5). The UDF installs, but
when i run it, it gives this error msg:
isc errorcode 335544343
invalid request BLR at offset 2, function ROUNDER is not defined...module
name or entrypoint could not be found.
the source code for the DLL follows:
#include <vcl.h>
#include <math.hpp>
#include "ibase.h"
#pragma argsused
extern "C" double _stdcall Rounder (int iPlaces, double dTarget)
{
double Holder ;
Holder = SimpleRoundTo(dTarget, iPlaces) ;
return(Holder) ;
//this code works fine in a console program
}
the DDL for the UDF is:
DECLARE EXTERNAL FUNCTION ROUNDER
INTEGER, DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'Rounder' MODULE_NAME 'MyUDF'
compiling it with the C option on and multithreaded option on, it compiles
fine...it still does not work with Firebird (1.5). The UDF installs, but
when i run it, it gives this error msg:
isc errorcode 335544343
invalid request BLR at offset 2, function ROUNDER is not defined...module
name or entrypoint could not be found.
the source code for the DLL follows:
#include <vcl.h>
#include <math.hpp>
#include "ibase.h"
#pragma argsused
extern "C" double _stdcall Rounder (int iPlaces, double dTarget)
{
double Holder ;
Holder = SimpleRoundTo(dTarget, iPlaces) ;
return(Holder) ;
//this code works fine in a console program
}
the DDL for the UDF is:
DECLARE EXTERNAL FUNCTION ROUNDER
INTEGER, DOUBLE PRECISION
RETURNS DOUBLE PRECISION BY VALUE
ENTRY_POINT 'Rounder' MODULE_NAME 'MyUDF'