Hello together,
I have the problem that Acknex it keeps crashing on my script.
The fact is however that the MySQL insert is executed. The line is entered, but immediately afterwards Acknex crashes.
Here is the error code:
Problemsignatur:
Problemereignisname: BEX
Anwendungsname: acknex.exe
Anwendungsversion: 0.0.0.0
Anwendungszeitstempel: 4c1231af
Fehlermodulname: acknex.dll
Fehlermodulversion: 8.3.0.5
Fehlermodulzeitstempel: 4eb13df9
Ausnahmeoffset: 00182c8c
Ausnahmecode: c0000409
Ausnahmedaten: 00000000
Betriebsystemversion: 6.1.7600.2.0.0.768.3
Gebietsschema-ID: 1031
Zusatzinformation 1: 019f
Zusatzinformation 2: 019f0fb0f49029b6b11d19337fe05523
Zusatzinformation 3: 939a
Zusatzinformation 4: 939a6e019afc7c038880dadbb56c3d15
The Script:
#include <acknex.h>
#include <windows.h>
#include <default.c>
// Dummy prototypes
void *mysql_init(void *foo);
void *mysql_real_connect(void *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long client_flag);
void *mysql_query(void *mysql, const char *q);
void *mysql_num_rows(void *res);
void *mysql_close(void *mysql);
STRING* mysql_error(void *mysql);
BMAP* cursor_pcx = "cursor.pcx";
void main()
{
///////////////////////////LADE LIBYSQL.DLL /////////////////////////////////////
HINSTANCE dllHandle = LoadLibrary("libmysql.dll");
if (dllHandle != NULL)
{
/////////////////////////GET MYSQL INIT ///////////////////////////////////////
mysql_error = GetProcAddress(dllHandle, "mysql_error");
mysql_init = GetProcAddress(dllHandle, "mysql_init");
if (NULL == mysql_init)
{
printf("Konnte Function mysql_init nicht laden!");
}
/////////////////////////GET MYSQL REAL CONNECT ///////////////////////////////
mysql_real_connect = GetProcAddress(dllHandle, "mysql_real_connect");
if (NULL == mysql_real_connect)
{
printf("Konnte Function mysql_real_connect nicht laden!");
}
/////////////////////////GET MYSQL QUERY//////////////////////////////////////
mysql_query = GetProcAddress(dllHandle, "mysql_query");
if (NULL == mysql_query)
{
printf("Konnte Function mysql_query nicht laden!");
}
//////////////////////////GET MYSQL NUM ROWS //////////////////////////////////
mysql_num_rows = GetProcAddress(dllHandle, "mysql_num_rows");
if (NULL == mysql_num_rows)
{
printf("Konnte Function mysql_num_rows nicht laden!");
}
//////////////////////////GET MYSQL CLOSE //////////////////////////////////
mysql_close = GetProcAddress(dllHandle, "mysql_close");
if (NULL == mysql_num_rows)
{
printf("Konnte Function mysql_close nicht laden!");
}
} else {
printf("Konnte libmysql.dll nicht laden!");
}
/////////////////////////////Testabfrage//////////////////////////////////////
if (mysql_init != NULL && mysql_real_connect != NULL && mysql_query != NULL && mysql_num_rows != NULL) // Konnten alle Funktionen gelinkt werden?
{
void *mysql = mysql_init(NULL); // MySQL Inizialisierung
if(!mysql) // Konnte Initialisiert werden?
{
printf("MySQL Initialization Failed");
} else {
void *mysql = mysql_real_connect(mysql, "localhost", "root", "", "cdcol", 3306, NULL, 0); // Baue Verbindung zum MySQL Server auf
if(!mysql) // Konnte verbunden werden?
{
printf("Connection Failed!");
} else {
// const char abfrage; // Erstelle const Char für die Abfrage
// str_cpy(abfrage, "select * from cds"); // Kopiere die Abfrage in die vordefinierte Const Char
void *res = mysql_query(mysql, "INSERT INTO cds (titel, interpret, jahr) VALUES ('Nightwish', 'muh', '999');"); // führe Abfrage aus
STRING *Errortext =mysql_error (res);
if(!res) // Konnte Abfrage ausgeführt werden?
{
printf(Errortext);
// mysql_close(mysql);
} else {
void *numrows = mysql_num_rows(res); //Zeige anzahl Reihen
if(!numrows) // Konnten die Reihen gezählt werden?
{
printf("Get numrows Failed!");
} else {
printf("test"); // Gebe Reihen aus
}
}
}
}
}
video_screen = 2; // start window mode
video_mode =8;
screen_color.blue = 150;
mouse_mode = 4; // show the mouse pointer
mouse_map = cursor_pcx; // set the mouse pointer bitmap
while (1)
{
mouse_pos.x = mouse_cursor.x; // allow the mouse pointer to move
mouse_pos.y = mouse_cursor.y; // on the x and y axis
wait (1);
}
}
acklog.txt:
Log of A8 Engine 8.30.5 run at Mon Dec 26 14:31:14 2011
Waldnebel on Windows NT/2000/XP version 6.1 Build 7600
Options -diag
App: J:\Projekt X\Game Daten\Start\testx.cd\testx.exe in J:\Projekt X\Game Daten\Start\testx.cd\
Author: (Name replaced

)
MM mixer opened
DSOUND device opened
DI interface opened
Start Window opened(c) Conitec -
www.3dgamestudio.comA8 Engine - Commercial Edition V8.30.5 - Nov 2 2011
Linking J:\Projekt X\Game Daten\Start\testx.cd\testx.exe...
Mouse found
Kopfhörer (3- Microsoft LifeChat LX-3000 ) opened
ATI Radeon HD 5450 pure T&L device 1ff9 detected
D3D device ATI Radeon HD 5450 1ff9 selected.
mysql_close: function not found
mysql_error: function not found
mysql_init: function not found
mysql_num_rows: function not found
mysql_query: function not found
mysql_real_connect: function not found
pX_stats: function not found.
Running TESTX.EXE.
Main started at 1.267
Anyone a Idea?I tried to deaktivate the Firewall and Virusscan. Didnt work.
Thx a lot...
Waldnebel