Mail Archives: djgpp/1997/02/14/20:10:33
On 14 Feb 1997 16:25:46 GMT, Alexander Lehmann
<lehmann AT mathematik DOT th-darmstadt DOT de> wrote:
>Lennart Steinke <steinke AT zeus DOT adv-boeblingen DOT de> wrote:
>: Hi!
>
>: I'm currently playing with the idea of loading function dynamically
>: (for plug ins). It's working, but I've some questions:
>
>: 1) Do I have to lock the memory of the funtion after loading or
>: not?
>: 2) Are there already libs for djgpp which allow dynamic binding?
>
>There is a rather simple dynamic loader in the for of .dxe files
>(mainly used for the FPU-emulator) that allows loading a program piece
>that doesn't have any external references (libraries etc) and just a
>single entry point. It takes care of relocating the code to the new
>location and all. Since it doesn't handle references, it would be
>necessary to return a struct that contains function pointers to all
>available functions and variables (and probably pass one for functions
>in the main program), which would make porting a library to dxe a bit
>difficult (could be done with cpp directives, though).
>
>Maybe it would be better to write a full-fleged dll or so-like library
>support, but this would be much more complicated, of course (but would
>be a very welcome addition to djgpp, I think).
One already exists... DLMs.
http://spy.isp.nsc.ru/djgpp/dlm.htm
-------------------------------------
Peter Johnson
-------------------------------------
locke AT mcs DOT net
http://locke.home.ml.org
-------------------------------------
Freelance C/C++/Pascal/Asm programmer
for DJGPP, Borland, and Watcom compilers
Member of BiLogic demo group
-------------------------------------
- Raw text -