Author | Message | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [1289] - posted: 2012-12-26 18:18:00 yes you was correct . here is the prototype of the function Code:
I have update it but still crashed. here is the new code. Code:
http://www.freewebs.com/ogremagic/index.htm | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [1290] - posted: 2012-12-26 19:11:17 i have modified the test program , to discover where it crashed. here is the modification Code:
and found that it crashed after 7 iterations. also the crashed was in Sync function and here is the prototype of it Code:
so what code be the reason of crashing? http://www.freewebs.com/ogremagic/index.htm | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [1291] - posted: 2012-12-26 22:05:16 BTW , here is the cmd line of MSVC++10
does the compiler option "/MD" (multi threaded runtime library) itself is the reason of crashing? http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1292] - posted: 2012-12-26 22:21:44 There is not really much i can help with since i can't see the code for sync etc but it is possible you are doing something in sync that breaks. You can try to compile your dll with /MT instead to see if it solves the issue, else if you can send me a setup of your test app, with your dll and the zir code i can take a look when i get a bit free time. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [1293] - posted: 2012-12-27 21:08:14 ok, finally the problem is solved. any way , can ziron allow optional parameters with import library. something like this Code:
thanks. http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1294] - posted: 2012-12-27 21:43:51 I'm guessing the problem was the exported functions were stdcall? actually i think cdecl funcs mangled do not end with param size "@4" etc since ste stackmis handled by the caller As for default params, it does not already work? I will take a look when i get back in the office Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. | ||
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [1295] - posted: 2012-12-28 12:11:38 yes , the problem wes Stdcall and cdecl. MagicPro library has many stdcall functions and many c++ classes and c functions. so i am thinking to make all functions stdcall but for the classes i will see if i can make their public functions as a stdcall. BTW , who can i create an instance of C++ class in ziron and call it's function. http://www.freewebs.com/ogremagic/index.htm | ||
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [1298] - posted: 2012-12-28 15:50:45 Right now i have not looked much into this since c memory management is very different, this is a feature i plan to look into for Ziron 2, to be able to create c++ compatible classes. The class would need to be created in ziron and then only the functions would be used from the c++ class, all memory management would need to be localside. e.g. Code:
But i will first look into this for Ziron 2. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 5 user(s) online. 0 member(s) and 5 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |