我想将字节数组注入32位进程中。为此,我使用此库https://github.com/Akaion/Bleak。当我尝试注入时,会收到NullReferenceException。但是,当我放置一个断点并手动浏览所有代码时,它可以工作。我以为也许我可以睡一会儿来解决问题,但这没用
byte[] bDllData = new byte[FileLength];
stream.Read(bDllData, 0, FileLength);
try
{
Injector inj = new Injector();
bool result = inj.ManualMap("csgo", bDllData);
if (!result)
throw new Exception();
MessageBox.Show("Successfully injected", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
}