mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
refactor(Injector): switch to file-scoped namespaces
This commit is contained in:
parent
b5f34c3199
commit
f30ebe5166
3 changed files with 1288 additions and 1291 deletions
|
|
@ -16,13 +16,13 @@ using Serilog.Events;
|
||||||
|
|
||||||
using static Dalamud.Injector.NativeFunctions;
|
using static Dalamud.Injector.NativeFunctions;
|
||||||
|
|
||||||
namespace Dalamud.Injector
|
namespace Dalamud.Injector;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entrypoint to the program.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class EntryPoint
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Entrypoint to the program.
|
|
||||||
/// </summary>
|
|
||||||
public sealed class EntryPoint
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A delegate used during initialization of the CLR from Dalamud.Injector.Boot.
|
/// A delegate used during initialization of the CLR from Dalamud.Injector.Boot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -318,5 +318,4 @@ namespace Dalamud.Injector
|
||||||
|
|
||||||
Log.Information("Done");
|
Log.Information("Done");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@ using Serilog;
|
||||||
using static Dalamud.Injector.NativeFunctions;
|
using static Dalamud.Injector.NativeFunctions;
|
||||||
using static Iced.Intel.AssemblerRegisters;
|
using static Iced.Intel.AssemblerRegisters;
|
||||||
|
|
||||||
namespace Dalamud.Injector
|
namespace Dalamud.Injector;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This class implements injecting into a remote process. It is a highly stripped down version of the
|
||||||
|
/// https://github.com/Reloaded-Project injector/assembler implementation due to issues with Lutris and
|
||||||
|
/// Wine.
|
||||||
|
/// </summary>
|
||||||
|
internal sealed class Injector : IDisposable
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// This class implements injecting into a remote process. It is a highly stripped down version of the
|
|
||||||
/// https://github.com/Reloaded-Project injector/assembler implementation due to issues with Lutris and
|
|
||||||
/// Wine.
|
|
||||||
/// </summary>
|
|
||||||
internal sealed class Injector : IDisposable
|
|
||||||
{
|
|
||||||
private readonly Process targetProcess;
|
private readonly Process targetProcess;
|
||||||
private readonly ExternalMemory extMemory;
|
private readonly ExternalMemory extMemory;
|
||||||
private readonly CircularBuffer circularBuffer;
|
private readonly CircularBuffer circularBuffer;
|
||||||
|
|
@ -355,5 +355,4 @@ namespace Dalamud.Injector
|
||||||
|
|
||||||
public long LPProcName { get; set; }
|
public long LPProcName { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Dalamud.Injector
|
namespace Dalamud.Injector;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Native user32 functions.
|
||||||
|
/// </summary>
|
||||||
|
internal static partial class NativeFunctions
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// Native user32 functions.
|
|
||||||
/// </summary>
|
|
||||||
internal static partial class NativeFunctions
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MB_* from winuser.
|
/// MB_* from winuser.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -223,13 +223,13 @@ namespace Dalamud.Injector
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
|
||||||
public static extern int MessageBoxW(IntPtr hWnd, string text, string caption, MessageBoxType type);
|
public static extern int MessageBoxW(IntPtr hWnd, string text, string caption, MessageBoxType type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Native kernel32 functions.
|
/// Native kernel32 functions.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static partial class NativeFunctions
|
internal static partial class NativeFunctions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// MEM_* from memoryapi.
|
/// MEM_* from memoryapi.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -833,5 +833,4 @@ namespace Dalamud.Injector
|
||||||
byte[] lpBuffer,
|
byte[] lpBuffer,
|
||||||
int dwSize,
|
int dwSize,
|
||||||
out IntPtr lpNumberOfBytesWritten);
|
out IntPtr lpNumberOfBytesWritten);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue