vendredi 1 septembre 2017

compile il byte array to assembly language

I can easely get the IL code with Methodbody.getIlAsByteArray but i need the assembly code to be able to inject it with Marshal.

I've gotten the assembly code of a method by reading the memory from MethodHandle.GetFunctionPointer to what looks like the end of the method. This is very slow and inefficient though.

The best would be if theres a way to compile the IL to assembly without having to read memory, But I'll accept any answer that's simpler than manually having to find the end of the method.





Aucun commentaire:

Enregistrer un commentaire