Function Ptr

BlitzMax Forums/BlitzMax Programming/Function Ptr

Yeah, that was what thinking about,

If you can create an array of oppcodes and invoke them as a function then you could concevably create a very fast scripting language (in practice it would be way hard). It has many other abilitys as well, you could combine it with a compiler to directly inject code into your excecutable.

I know it can be done in C++ because one of the examples in the 'Hacker Dissasembling Uncovered' book was on it. I was intreged as to wether it could be done in BlitzMax.

It does however require that the code it excecuted from the stack (I think :S ) and im sure there are ways that the opperating system can stop this. I know that some Viruses use this method to modify and encript there payload so that some scanners cant identify them.