RE: cdecl support
- Posted by Andy Serpa <renegade at earthling.net> Feb 25, 2002
- 429 views
Derek Parnell wrote: > I suppose some enterprising person could write a "conversion" DLL. One > that accepts Euphoria > parameters, passes them onto the _cdecl routine and returns the _cdecl > results to Euphoria? > > I have no idea if this is possible or how hard it might be; just a > thought. > That's what I did with the Karl's regex wrapper, which crashes when translated due to this problem. I made a middleman dll as we talked about last time that simply passes through the parameters to the real dll, and then passes back the result. Works fine. I'm going to make another for the SQL-Lite library, which has the same problem. I used the BCX basic to c translator with LCC. Using that, you can make your middleman .dll in just a couple of minutes. I'll post the method if anyone is interested. I don't know of way to make a universal one -- you have to put in equivalents for each individual function. You also have to add one extra initialization function, so the first .dll will open up the second one. If you need to set up callbacks back to a Euphoria routine, I have no idea how to do that...