Hey,
C-Lite gives out and windows error message (program must be terminated..) if I want to use a function out of an DLL, I opened via dll_open.
Example:
Code:
long GEdit_fileexist(STRING* GEditfile); //dllfunction for checking the existence of a GameEdit-File
function GameEdit_init_startup()
{
str_cpy(material_helpstr1,material_data_folder);
str_cat(material_helpstr1,"\\map-editor\\GameEdit_Small.dll"); //CORRECT PATH
GEdit_tmp_dll = dll_open(material_helpstr1); //NOT 0!!!
str_for_num(GEdit_helpstr1,GEdit_tmp_dll);
diag(GEdit_helpstr1);
diag(material_helpstr1); //checked.. :)
str_cpy(material_helpstr1,"hallo");
GEdit_fileexist(material_helpstr1); //CRASH!
}
Copying the DLL into the acknex_plugins folder and starting the function afterwards works perfectly (with exactly the same code).
Code:
long GEdit_fileexist(STRING* GEditfile); //dllfunction for checking the existence of a GameEdit-File
function GameEdit_init_startup()
{
str_cpy(material_helpstr1,"hallo");
GEdit_fileexist(material_helpstr1); //WORKS
}
Bug or any fault on my side?
Thanks for checking,
Timo Stark