Access Violation during Intialization.
Posted by: David Pratt
Date: January 07, 2013 07:29AM

I have been experimenting with the C API using C++Builder XE2, but when I call mysql_init, it generates an access error. System configuration is:

OS: Windows 7 64bit
MySQL server: 5.5.27 64bit
libmysql.dll ver: 5.5.29 32 bit

I am linking against a generated import lib using emb's implib, as Embarcadero's compilers use OMF library format as opposed to the COFF format used by VS. Everything links fine, but when I run teh code, it generaates an access error. I have been able to trace the error to inside mysql_server_init, but I get lost in the assembly code from there. From what I can see, I believe it may be the call to init_embedded_server that is causing a problem. The access violation actually occurs in a section of C++Builder's runtime library that is unloading modules, if this helps at all. The Basic code follows:


The libmysql.dll is already previously loaded during program startup.

Options: ReplyQuote

Written By
Access Violation during Intialization.
January 07, 2013 07:29AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.