Open ZeeDEU opened 5 years ago
I've got the same issue. Because the method GetClassFromName()
of the class Injector
return a pointer of zero.
@class = GetClassFromName(image, @namespace, className);
Since I dug deeper in the library code and I've found the issue comes from the method Execute()
of the same class. It is successful at creating a remote thread but failed at reading a long value from a previous allocated memory by the following code line:
IntPtr ret = Is64Bit ? (IntPtr)_memory.ReadLong(retValPtr) : (IntPtr)_memory.ReadInt(retValPtr);
The return value ret
gets zero. It looks like causing by the method 'ReadProcessMemory' from ReadLong()
because it returns an array of zero bytes, although the target address to read seems valid (non-zero).
I have no idea how to overcome it. If you don't have time to fix it, could you give me any suggestion to do myself? @warbler
More details for my apps: Target process: 64 bits Injected dll: 64 bits SharpMonoInjector console: 64 bits
Error: Failed to inject assembly: SharpMonoInjector.InjectorException: mono_class_from_name() returned NULL
I'm also running into this issue too.
I had this issue, fix (For me at least) was to compile my dll with the same version of .NET framework as the game I was injecting it into.
I had this issue, fix (For me at least) was to compile my dll with the same version of .NET framework as the game I was injecting it into.
I can confirm that fixed it for me too.
`` using System; using UnityEngine;
namespace InjectUnityBased { public class ForceLoader { public static GameObject loadobject;
} ``
pls i need to fix that :/