mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
WIP corehook
This commit is contained in:
parent
3f78ca5b81
commit
69e7cf9af9
7 changed files with 69 additions and 9 deletions
|
|
@ -1,6 +1,11 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO.Pipes;
|
||||
using System.Text;
|
||||
using CoreHook.BinaryInjection;
|
||||
using CoreHook.BinaryInjection.RemoteInjection;
|
||||
using CoreHook.BinaryInjection.RemoteInjection.Configuration;
|
||||
using CoreHook.IPC.Platform;
|
||||
|
||||
namespace Dalamud.Injector
|
||||
{
|
||||
|
|
@ -18,9 +23,34 @@ namespace Dalamud.Injector
|
|||
//
|
||||
}
|
||||
|
||||
public void Relaunch(uint pid)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public void Inject(uint pid)
|
||||
{
|
||||
|
||||
var corehookConfig = new RemoteInjectorConfiguration
|
||||
{
|
||||
ClrBootstrapLibrary = "",
|
||||
ClrRootPath = "",
|
||||
DetourLibrary = "",
|
||||
HostLibrary = "",
|
||||
InjectionPipeName = "",
|
||||
PayloadLibrary = "",
|
||||
VerboseLog = false,
|
||||
};
|
||||
|
||||
RemoteInjector.Inject(pid, corehookConfig, );
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class PipePlatform : IPipePlatform
|
||||
{
|
||||
public NamedPipeServerStream CreatePipeByName(string pipeName, string serverName = ".")
|
||||
{
|
||||
return new NamedPipeServerStream(pipeName, PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous, 0x10000, 0x10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue