mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
galaxy brain
This commit is contained in:
parent
2a82a16301
commit
f8a44f9135
3 changed files with 10 additions and 7 deletions
|
|
@ -10,7 +10,6 @@
|
|||
<PackageReference Include="CommandLineParser" Version="2.7.82" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dalamud\Dalamud.csproj" />
|
||||
<ProjectReference Include="..\lib\CoreHook\src\CoreHook.BinaryInjection\CoreHook.BinaryInjection.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using CommandLine;
|
||||
|
||||
using Dalamud.Injector.Windows;
|
||||
|
||||
namespace Dalamud.Injector
|
||||
{
|
||||
|
|
@ -8,11 +8,13 @@ namespace Dalamud.Injector
|
|||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Parser.Default.ParseArguments<InjectOptions>(args)
|
||||
var shit = Process.Open(12732);
|
||||
var cmd = shit.ReadCommandLine();
|
||||
/*Parser.Default.ParseArguments<InjectOptions>(args)
|
||||
.WithParsed<InjectOptions>(opt =>
|
||||
{
|
||||
|
||||
});
|
||||
});*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace Dalamud.Injector.Windows
|
|||
PROCESS_ACCESS_RIGHT.PROCESS_TERMINATE;
|
||||
|
||||
var handle = Win32.OpenProcess((uint) access, false, pid);
|
||||
if (!handle.IsInvalid)
|
||||
if (handle.IsInvalid)
|
||||
{
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ namespace Dalamud.Injector.Windows
|
|||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
return (uint)bytesRead;
|
||||
return (int)bytesRead;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -144,7 +144,9 @@ namespace Dalamud.Injector.Windows
|
|||
unsafe
|
||||
{
|
||||
var pPeb = ReadPebAddress();
|
||||
var pPebLdr = pPeb + (int)Marshal.OffsetOf<PEB>("ProcessParameters");
|
||||
|
||||
var pPebProc = ReadMemoryExact(pPeb + (int)Marshal.OffsetOf<PEB>("ProcessParameters");
|
||||
var
|
||||
|
||||
Span<byte> procParamBuf = stackalloc byte[sizeof(RTL_USER_PROCESS_PARAMETERS)];
|
||||
ReadMemoryExact(pPebLdr, procParamBuf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue