RunTime Error 216 When Programming with DLL´s
Posted: 22.10.2008, 11:34
Good Day experts in Delphi + Zeos.
I installed the Zeos Stable version 6.6.3 in my Delphi 7 and communication works perfectly in a common format and to use the so-called Zeus a DLL he also works fine until the moment they leave the program when it generates an exception code Run 216-time error at ????????, looked at all areas of the forum and found a solution that was to put the following lines in the event of Destroy LoadLibrary of each unit being mysql him:
destructor TZMySQLNativeLibraryLoader.Destroy;
begin
if (Loaded) and (@api_rec.mysql_server_end <> nil) then
api_rec.mysql_server_end;
inherited Destroy;
end;
Except that the units are already in version 6.6.3 with the code above, then tried to catch the libmysql of other distributions and nothing worked, does someone have to give a hint?
As I said Mysql5.0 use Zeos + + Delphi 7 and the problem only happens if you run Zeos a DLL, so it was seeing it seems that this is because when you call the Zeos it creates an instance of limysql executed for each call and when you close the libmysql the program is no longer in memory and overall generation of the error but how can resolve this situation?
PS: I tried to use the following LIBs:
* What is the distribution mysql (2076672 bytes)
* What comes with the package Zeos version 6.6.0 (1470464 bytes) that already in the 6.6.3 download had not the dlls (sourceforge)
* I tried to change the protocol in zconnection for mysql - mysql 5 - mysqld5.
* I tried to change the name of the DLL's to mysql50.dll mysql51.dll only mysql.
Thank you all!
I installed the Zeos Stable version 6.6.3 in my Delphi 7 and communication works perfectly in a common format and to use the so-called Zeus a DLL he also works fine until the moment they leave the program when it generates an exception code Run 216-time error at ????????, looked at all areas of the forum and found a solution that was to put the following lines in the event of Destroy LoadLibrary of each unit being mysql him:
destructor TZMySQLNativeLibraryLoader.Destroy;
begin
if (Loaded) and (@api_rec.mysql_server_end <> nil) then
api_rec.mysql_server_end;
inherited Destroy;
end;
Except that the units are already in version 6.6.3 with the code above, then tried to catch the libmysql of other distributions and nothing worked, does someone have to give a hint?
As I said Mysql5.0 use Zeos + + Delphi 7 and the problem only happens if you run Zeos a DLL, so it was seeing it seems that this is because when you call the Zeos it creates an instance of limysql executed for each call and when you close the libmysql the program is no longer in memory and overall generation of the error but how can resolve this situation?
PS: I tried to use the following LIBs:
* What is the distribution mysql (2076672 bytes)
* What comes with the package Zeos version 6.6.0 (1470464 bytes) that already in the 6.6.3 download had not the dlls (sourceforge)
* I tried to change the protocol in zconnection for mysql - mysql 5 - mysqld5.
* I tried to change the name of the DLL's to mysql50.dll mysql51.dll only mysql.
Thank you all!