AppDomain.CreateInstanceFromAndUnwrap - Unable to cast transparent proxy

后端 未结 1 822
孤城傲影
孤城傲影 2020-12-15 05:16

I\'m writing a .NET library to inject managed DLLs into external processes. My current approach is:

  1. Use CreateRemoteThread to force the target pro
相关标签:
1条回答
  • 2020-12-15 05:52

    Found the fix for this problem here: http://www.west-wind.com/WebLog/posts/601200.aspx

    It looks like a bug in the .NET framework. The solution is to add a handler to AppDomain.CurrentDomain.AssemblyResolve which manually loads & returns the assembly at args.Name. Then you can call CreateInstanceFromAndUnwrap without it throwing an exception.

    0 讨论(0)
提交回复
热议问题