Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread FreeLibrary() a dll with DBISAMDatabase C/S connection freezes
Thu, Mar 30 2006 10:28 AMPermanent Link

Jack G.
Hello DBISAM team.

I recently got working my trial version of 4.22 with success.

Now I have a strange behaviour. I load a dll which opens a remote database connection. Everything is fine, except when I close my app, I call FreeLibrary
(dllhandle), and the program freezes.

I have isolate the problem. I have a line which opens the connection:

DataModule1->DBISAMDatabase1->Connected = true;

When this line is uncommented, the FreeLibrary hangs the execution. When I comment this line, the program closes normally.

So I guess some resource is kept inside this dll when unloaded. I have tried to disconnect the database component when the Dll is detached. No success.

How should I close a session correctly? Maybe I am leaving something inside the dll?

Please any ideas will be welcomed. Once again, thanks for the support.
Thu, Mar 30 2006 11:05 AMPermanent Link

Jack G.
I have added a new statement when dll is detached.

DataModule1->DBISAMSession1->Close();

The program freezes at this point. Any clue?
Thu, Mar 30 2006 2:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jack,

<< I recently got working my trial version of 4.22 with success.

Now I have a strange behaviour. I load a dll which opens a remote database
connection. Everything is fine, except when I close my app, I call
FreeLibrary (dllhandle), and the program freezes. >>

Are you trying to reference any DBISAM components in the DLL directly from
the application ?  If so, then do not do this.  The DLL and EXE use
completely separate class information, virtual method tables, etc. and you
cannot mix the two.  If you want to do this, then you need to use a runtime
package instead.

If you aren't mixing the two, then if you could post the source to the DLL,
it would help immensely.

Thanks,

--
Tim Young
Elevate Software
www.elevatesoft.com

Image