Hi there, I've been trying to create a small project that basically will
intercept a call to a certain method in a WinRT application and replace the
call with a generated static method.
Everything has been working great until now. I inject the code with a
regular desktop application. The problem is that I use
il.Emit(OpCodes.Call,
Module.Import(typeof(System.Text.Encoding).GetMethod("get_UTF8")));
This generates the il
call class [mscorlib]System.Text.Encoding
[mscorlib]System.Text.Encoding::get_UTF8()
But, I appear to need it to generate
call class [System.Text.Encoding]System.Text.Encoding
[System.Text.Encoding]System.Text.Encoding::get_UTF8()
How do I go about adding a type reference to a built in assembly that isn't in
my injecting application?
--
--
mono-cecil