Perplex Posted May 30, 2016 Posted May 30, 2016 (edited) How to add instruction without operand in dnlib, For example I wanted add Call opcode without operand, Is it possible? Edited May 30, 2016 by Perplex
CodeExplorer Posted May 30, 2016 Posted May 30, 2016 No it's not posible! And why you want call witouth operand from first place? 1
Perplex Posted May 30, 2016 Author Posted May 30, 2016 I wanted add invalid instruction to for each mehod.
A200K Posted May 30, 2016 Posted May 30, 2016 (edited) 8 hours ago, Perplex said: I wanted add invalid instruction to for each mehod. IL code is compiled to native asm code on runtime, and even if you would just jump over this "invalid" instruction, the .net runtime wouldn't know how to parse this, causing your program to crash. You'd have to remove this instruction before you call this function. Otherwise, if you want, just try and see for yourself method.Body.Instructions.Add( OpCodes.Call.ToInstruction( ) ); Edited May 30, 2016 by A200K
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now