Access Violation during Intialization.
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.