Using ADO components linked between an .exe - .dll interface

Hallo,

we want to move our Delphi application from BDE to the ADO Interface using:

Delphi4 with npADO Components Version: 1.4.5,
LCPI OLE DB Provider Version 2.0.1.735,
Firebird Database Version 1.5beta3,
NT 4.0 with MDAC 2.5

Our application uses TADOConnection components and TADOQuery components in
an .exe module
without problems. Some parts of the windows are put into .dll modules.
To reduce the number of connections to the database, we transfer the pointer
of a TADOConnection
to the DLL so that the TADOQuery objects can use it. Also we establish a
TADOQuery - TDatasource - TADOQuery link to transfer the contents of some
key fields of the first
query to the detail query.
This worked well with the BDE when using at some places the command
"Check(DbiSetCurrSession(Session.Handle))", but with ADO I get an error
message like
"A parameter object is not successfully defined. Inconsistent or
unsufficient information was given".

Replacing the Check commands with CoInitialize and CoUninitialize commands
was of no
success.
I observed in the de{*word*81} session, that within Delphi the class
identification with the
operator "is" and the property ClassType does not work correctly with
objects from the other side,
but this should not be a problem for the ADO interface. (The message comes
from the command
"ParameterCollection.Append(Items[I].ParameterObject);" in
TParameters.AppendParameters.)

Who can help me ?

With thanks in advance and best regards

Lothar Weidl-Walther
Remscheid, Germany