0 registered members (),
984
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
dll_open and c-Lite
#176048
01/02/08 17:13
01/02/08 17:13
|
Joined: Oct 2002
Posts: 4,753 Munich, Bavaria, South of Germ...
TripleX
OP
Expert
|
OP
Expert
Joined: Oct 2002
Posts: 4,753
Munich, Bavaria, South of Germ...
|
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
|
|
|
Re: dll_open and c-Lite
[Re: jcl]
#176057
01/05/08 13:41
01/05/08 13:41
|
Joined: Sep 2003
Posts: 9,859
FBL
Senior Expert
|
Senior Expert
Joined: Sep 2003
Posts: 9,859
|
I've tried that. The game still crashes, regardless whether I try wii_handle_n = dll_open("dll\\ackwii.dll"); and put the dll into a DLL subfolder or I use wii_handle_n = dll_open(".\\ackwii.dll");
However I noticed that the handle is set correctly, even without WDL file. So it must be some other function relying on plugindir. I'm not doing much else interesting than calling functions directly from the DLL. Only using a WDL file fixes this for me.
As to the Wiimote DLL I'm using some old public domain C++ source which is no longer maintained, so I started fixing bugs and implementing proper IR support on my own. Things work pretty well now - only supporting the Classic Controller will need some rewrite of poorly designed functions from the original code. I wanted to work on this after January when exams are finished.
Last edited by Firoball; 01/06/08 01:57.
|
|
|
|