Subject RE: [IBO] Passing an IB_Connection to a dll function
Author Kevin Stanton
Would love to see a sample app on this one. I've got a large app and am
getting to the point of needing to break it up into modules.
-----Original Message-----
From: Daniel Rail [mailto:daniel@...]
Sent: Thursday, November 04, 2004 4:08 AM
Subject: Re: [IBO] Passing an IB_Connection to a dll function


At November 4, 2004, 00:37, Robert martin wrote:

> In our app we have an ability to call a Dll function each time and
> transaction is processed. Under Dbase we just connected to the database
> a second time, under Firebird this would require another connection
> can be slow). We want to avoid this, can a Ib_Connection be passed to a
> function?

What I usually do, is pass the TIB_Connection.dbHandle property to the
DLL and assign it to the TIB_Connection.dbHandleShared property in the
DLL. And, you don't have to call Connect and Disconnect, since you are
already using an existing connection handle.

> If that is possible, is there any problem if it is passed from a thread
> the main application?

If the DLL is dynamically loaded and unloaded within the context of the
then I don't see any problems. Otherwise, there would most likely be

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (

IB Objects - direct, complete, custom connectivity to Firebird or
without the need for BDE, ODBC or any other layer.

___________________________________________________________________________ - your IBO community resource for Tech Info
keyword-searchable FAQ, community code contributions and more !

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

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