-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I get the following exception when I create an Injector for a suspended process:
System.ComponentModel.Win32Exception: 'Only part of a ReadProcessMemory or WriteProcessMemory request was completed'
This is the code I use to create the process and inject.
if (CreateProcess(location, new StringBuilder($@"""{location}"" {arguments}"), null, null, false, CREATE_PROCESS.CREATE_SUSPENDED, null, null, new STARTUPINFO(), out var processInformation))
{
var process = Process.GetProcessById((int)processInformation.dwProcessId);
var injector = new Injector(process);
}If I create the process without the CREATE_SUSPENDED flag, it launches without any errors.
For context, I'm coming from EasyHook and was looking for a more updated alternative and found Reloaded.Injector/Reloaded.Hooks.
In EasyHook, injecting into a suspended thread works as expected, where I then resume the thread from inside when I'm ready.
Metadata
Metadata
Assignees
Labels
No labels