anyone, any tips (EXE starting memory)?
Those who understand C + + or assembly and can convert to Pascal, I can search by codes
You got some answers already. Like:
- You can't execute code from a data segment in a modern processor.
- You can use a compressor upx if the binary size is the problem.
- You can create a temporary executable file and run it.
What do you actually want to do? It sounds you want some "normal" operation done in a tricky way.
Let me guess: You are making some kind of plugin system where code modules are loaded dynamically when needed. Those modules can be added and changed without recompiling your program.
Ok, dynamic libraries are meant to solve your problem! They are even multi-platform (.dll in windows, .so in *nix systems). There are functions to load them dynamically on-demand from your program (Loadlibrary func). You can still store those binary libraries into a DB if you want, and then save them to disk only when needed.
I have not made dynamic libraries myself using FPC but it should be possible.
Juha