Function Ptr

BlitzMax Forums/BlitzMax Programming/Function Ptr

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

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.