Subject C++ with IBObjects and Interbase UDF's
Author Chris Hulsey
Hello,

I created a DLL with C++ Builder, and I included VCL and IBObjects within
the DLL project. After successfully creating the DLL I then copied the file
over to the station where the Interbase Server resides. I believe that I
created the DLL properly with respect to external calls from other
applications.

Next using ISQL I created the UDF to point to this new DLL. I believe that
the path and syntax for the UDF were correct and that there was no problem
at this point. Later I tried to test the UDF using a simple SELECT
statement but all I get is the following message:

"Function APP_IMAGE is not defined (but it is). entry_ point or
module_name could not be found."

Is this a problem because I created the DLL with C++ rather than using the
API and regular old "C". When creating the project I used the "C"
conventions though. What in the world is going on here?? HELP???

Here is sample code of my DLL project for file SalonDll.dll:

//--------------------------------------------------------------------------

#include <vcl.h>
#include <windows.h>
#pragma hdrstop

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "IB_Components.hpp"

#pragma package(smart_init)
#pragma link "IB_Components"

extern "C" __declspec(dllexport) long UpdateImageFile(long *,long *,long
*,long *,long *,long *,long *,long *);

#pragma argsused
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*
lpReserved)
{
return 1;
}

// Update Appointment Image File
long UpdateImageFile(long *Employee ,long *Elapsed_Days,long *Client_ID
,long *Service_ID,
long *Client_Type,long *Start_Time ,long
*Process_Time,long *Internet)
{
TIB_Database *IB_Database;
TIB_Query *IB_Query;
long Britney_Spears_Age=19;
...
...
...
...
...

return Britney_Spears_Age;
}
//------------------------------------------------------------------------

Here is a sample of my UDF when declaring in ISQL on Interbase Server:

DECLARE EXTERNAL FUNCTION APP_IMAGE
INTEGER, INTEGER, INTEGER, INTEGER, INTEGER, INTEGER,
INTEGER, INTEGER
RETURNS INTEGER BY VALUE
ENTRY_POINT 'UpdateImageFile' MODULE_NAME 'SalonDll';

Here is a sample of my SELECT statement:

SELECT * FROM APP_REL_FILE WHERE ID > APP_IMAGE(1,2,3,4,5,6,7,8)

This is the Error:

"Function APP_IMAGE is not defined"
"- entry_ point or module_name could not be found."

I would appreciate any response. Thank you for your time.

Chris Hulsey
Visible Changes, Inc.
chris@...


[Non-text portions of this message have been removed]