Board index » delphi » Wierd - Has Anyone Ever Seen Something Like This?

Wierd - Has Anyone Ever Seen Something Like This?

I've got a third party DLL for telecommunications billing (EZTax from
Billsoft, Inc.). We need to tax customer call records which reside in a MS
SQL Server 7.0 database.

The vendor has supplied C header files for their library. So I ported the
headers to Delphi 5 and everything works fine. The vendor's SDK includes a
sample ASCII file of records to tax, and I can read and tax those ASCII
records just fine. But now I need to have my Delphi application connect to
the MS SQL server and read untaxed call records, tax them, and then store
the computed taxes (from the vendors DLL output) back to the MS SQL Server.

So here's the wierd part. If I remove all references to the BDE (TDatabase,
TQuery, etc) and attempt to dynamically load the EZTax DLL and call it's
initialization function --- no problems --- everything is fine.

If I drop a TQuery on the form without a TDatabase and have the TQuery
connect to the DB --- and then attempt to dynamically load the EZTax DLL and
call it's initialization function  --- still no problem.

If I drop a TDatabase on the form and use it for the DB connection and then
try to dynamically load the EZTax DLL and call it's initialization
function --- BIG PROBLEM. Here the DLL does successfully load, but I get a
big fat Access Violation upon calling the EZTax initialization method.

Note: the initialization method referred to above is just an exported DLL
function that allocates some system resources and prepares the EZTax DLL for
multithreaded user sessions declared below:

__declspec (dllexport) struct taxes_tbl *EZTaxInit(short int tax_log, short
int open_db,
                        int cache_size, struct file_path *paths,
                        long int *session_hdl);

Any thoughts? Since the DLL was written in C++, I'm not passing any Object
Pascall strings, so I shouldn't need ShareMem in my uses clause.

I'm assuming that since this is only a problem with the BDE memory manager
(me thinks) that this is the correct newsgroup.

Please help!
Paul

 

Re:Wierd - Has Anyone Ever Seen Something Like This?


One thing I forgot to mention...the TADOConnection and TADOQuery components
work without issue. It seems to only be related to the BDE/SQL Links
components.

Regards,
Paul

Quote
"Paul Hazlett" <paul_hazl...@yahoo.com> wrote in message

news:3a366d44$1_1@dnews...
Quote
> I've got a third party DLL for telecommunications billing (EZTax from
> Billsoft, Inc.). We need to tax customer call records which reside in a MS
> SQL Server 7.0 database.

> The vendor has supplied C header files for their library. So I ported the
> headers to Delphi 5 and everything works fine. The vendor's SDK includes a
> sample ASCII file of records to tax, and I can read and tax those ASCII
> records just fine. But now I need to have my Delphi application connect to
> the MS SQL server and read untaxed call records, tax them, and then store
> the computed taxes (from the vendors DLL output) back to the MS SQL
Server.

> So here's the wierd part. If I remove all references to the BDE
(TDatabase,
> TQuery, etc) and attempt to dynamically load the EZTax DLL and call it's
> initialization function --- no problems --- everything is fine.

> If I drop a TQuery on the form without a TDatabase and have the TQuery
> connect to the DB --- and then attempt to dynamically load the EZTax DLL
and
> call it's initialization function  --- still no problem.

> If I drop a TDatabase on the form and use it for the DB connection and
then
> try to dynamically load the EZTax DLL and call it's initialization
> function --- BIG PROBLEM. Here the DLL does successfully load, but I get a
> big fat Access Violation upon calling the EZTax initialization method.

> Note: the initialization method referred to above is just an exported DLL
> function that allocates some system resources and prepares the EZTax DLL
for
> multithreaded user sessions declared below:

> __declspec (dllexport) struct taxes_tbl *EZTaxInit(short int tax_log,
short
> int open_db,
>                         int cache_size, struct file_path *paths,
>                         long int *session_hdl);

> Any thoughts? Since the DLL was written in C++, I'm not passing any Object
> Pascall strings, so I shouldn't need ShareMem in my uses clause.

> I'm assuming that since this is only a problem with the BDE memory manager
> (me thinks) that this is the correct newsgroup.

> Please help!
> Paul

Other Threads