Re: Euphoria DLLs
- Posted by Juergen Luethje <j.lue at gmx.de> Apr 20, 2003
- 493 views
Again code is nipped on this list ... Second trial: Hello Rob, thanks for your reply. You wrote: > Juergen Luethje wrote: [...] > Things are guaranteed to work if 31-bit integers are > passed. If a 32-bit integer is passed in from C, > things might still work (all the time), > depending on what you do with that value. The 32 bit values that are passed in from the main program [1] to my DLL are memory addresses, that the DLL code uses for peek()ing and poke()ing. > You would have to examine the > C code generated by the Translator in each case > to determine if 32-bits will work. What rules shall I use to make such decisions? Unfortunately, I almost don't know anything about C programming. > If necessary, you could code your own little C > routine, and make that the entry point to > your .dll. It could then handle any 32-bit arguments, > before calling one of your Translator-generated routines. > In general, it could simply convert each C 32-bit integer > into a Euphoria atom (C double) with one C statement. Maybe you (or someone else) could give me a template or an example how to do this? >> How big are the chances that a future version >> of the translator will create DLLs (and SOs) >> that exchange 32-bit integer values with C programs? > > It depends on how many people need this. > So far I haven't seen many people wanting to call > Euphoria .dll's from C. If Euphoria could produce industry standard DLLs, I think it also could be for instance very useful for Visual Basic programmers to use a DLL created with Euphoria to speed up critical parts of their code. TIA, and best regards, Juergen --=----=---=---=---=---=---=---=---=-- [1] The main program that calls my DLL (Total Commander) is actually written in Delphi, not in C. I don't know whether that matters here.