Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread How to pass DB connection object from host to DLL
Wed, Aug 4 2010 1:53 PMPermanent Link

Jianfei Xu

Hi,

We would like to create Elevate DB connection in the host and would like to pass the databse and DBSection to DLL, so the dll will be able to access EDB without create Database object and DBSection inside every DLLs.

Thanks,

Jianfei
Thu, Aug 5 2010 3:31 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jianfei,

<< We would like to create Elevate DB connection in the host and would like
to pass the databse and DBSection to DLL, so the dll will be able to access
EDB without create Database object and DBSection inside every DLLs. >>

I'm sorry, but you can't do that with Delphi objects.  The DLL and the EXE
have two different class layouts in memory, and mixing the two will result
in all sorts of problems.

--
Tim Young
Elevate Software
www.elevatesoft.com
Thu, Aug 5 2010 6:41 PMPermanent Link

Jianfei Xu

HI, Tim

So, any other way to access Elevate DB from Host and Plugins at the same time without problem.

For plugin architecture, I would like to access local Elecate DB from host and plugins at the same time. Can I create Database Object and Section Object in host and every plugins without any problem. I knid of remember, one application only allows one DB engine running?

Thanks,

Jianfei
Thu, Aug 5 2010 7:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jianfei,

<< So, any other way to access Elevate DB from Host and Plugins at the same
time without problem. >>

You can use runtime packages, and that's the only option, unfortunately.  It
just goes back to the way that Delphi objects work.  If was to come up with
some COM objects for EDB, then that would allow the use of the objects
between EXEs and DLLs, but as of right now that isn't in our plans.

<< For plugin architecture, I would like to access local Elecate DB from
host and plugins at the same time. Can I create Database Object and Section
Object in host and every plugins without any problem. I knid of remember,
one application only allows one DB engine running? >>

Yes, you can create separate session and database objects in both the host
and the plugins.  The engine instance isn't an issue because the DLL gets a
separate Engine instance that is isolated from the Engine instance in the
EXE.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image