MyAccess in dll error

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Iskren
Posts: 3
Joined: Sun 03 Jan 2010 18:06

MyAccess in dll error

Post by Iskren » Sun 03 Jan 2010 18:30

Hello,
I create application witch Delphi 2009 and MyDAC 5.90. My application load dynamically dll library. When I use MyAccess in dll my application crash when I unload library (freeLibrary). If I remove MyAccess from dll everything work fine.

This is example of crash code:

DLL:

Code: Select all

library lib;
uses
  SysUtils,
  Classes,
  MyAccess;

{$R *.res}

begin
end.
Application:

Code: Select all

procedure TForm2.Button1Click(Sender: TObject);
var
  dllHandle: THandle;
begin

    dllHandle := loadLibrary('lib.dll');
    freeLibrary(dllHandle);

end;
Try to click 2 times button1. Application will crash.
I remove all other function from dll and application to be sure the problem is in MyAccess.
This crash when I use Lazarus too.

Sorry for my bad english.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 04 Jan 2010 09:16

I can not reproduce the problem. Please, try to download the latest MyDAC build (5.90.0.54) and check if this problem still exists.

Iskren
Posts: 3
Joined: Sun 03 Jan 2010 18:06

Post by Iskren » Mon 04 Jan 2010 10:15

You can download sample here: download

Please run Project1.exe and click button1 2 times. When you click second time program will crash. The source code is included in zip file.
Maybe the problem is because I use trial version, but I must to be sure before I buy it.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 04 Jan 2010 13:44

This problem is connected with using MyDAC Trial Edition. To solve the problem you should use a non-trial MyDAC version.

Iskren
Posts: 3
Joined: Sun 03 Jan 2010 18:06

Post by Iskren » Mon 04 Jan 2010 13:47

10x Dimon. I will buy it.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 04 Jan 2010 14:53

If any other questions come up, please contact me.

Post Reply