Fix inject problems (#820)

* CoreCLR: resolve and load nethost on demand instead of requiring it on load

* Remove nethost loading from C# side

* Added option to not chain Process.Dispose; see for last error only if result is empty
This commit is contained in:
kizer 2022-04-25 17:13:32 +09:00 committed by GitHub
parent 5b4833a6f7
commit 9a38a9470c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 94 deletions

View file

@ -634,17 +634,13 @@ namespace Dalamud.Injector
private static void Inject(Process process, DalamudStartInfo startInfo)
{
var nethostName = "nethost.dll";
var bootName = "Dalamud.Boot.dll";
var nethostPath = Path.GetFullPath(nethostName);
var bootPath = Path.GetFullPath(bootName);
// ======================================================
using var injector = new Injector(process);
using var injector = new Injector(process, false);
injector.LoadLibrary(nethostPath, out _);
injector.LoadLibrary(bootPath, out var bootModule);
// ======================================================