On 29 Aug, 00:31, Jb Evain <[email protected]> wrote:
> Hi,
>
> On Sun, Aug 28, 2011 at 9:40 PM, UbbeLoL <[email protected]> wrote:
> > But when running the finished assembly in PEVerify with the /IL
> > parameter it gives me this:
>
> > "Unable to resolve token." on offset 0x0007 (newobj instance void
> > [System]System.Threading.ThreadExceptionEventHandler::.ctor(object,
> > native int))
>
> > How do I solve this issue, or is there something i'm completely
> > missing out here?
>
> I can't reproduce this. Could you post a solution which reproduces your issue?
>
> Thanks!
>
> Jb


I'm not quite sure what you wanted me to post, but here's the code i'm
trying to re-produce with IL but in C#:

        [STAThread]
        static void Main()
        {
            Application.ThreadException += new
ThreadExceptionEventHandler(test);
        }

        static void test(object sender, ThreadExceptionEventArgs e)
        {
            MessageBox.Show(e.Exception.Message);
        }

I'm not good enough to directly write in IL off the top of my head, so
I get the IL code from compield assemblies using ILDasm, the IL
sequence you see at the top is where I tried re-producing the IL code
from the ILDasm result.

-- 
--
mono-cecil

Reply via email to