mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
chore: make SigScanner public, have separate service TargetSigScanner that resolves via ISigScanner (closes #1426)
This commit is contained in:
parent
1d0b61e32b
commit
ebabb7bd04
26 changed files with 55 additions and 41 deletions
28
Dalamud/Game/TargetSigScanner.cs
Normal file
28
Dalamud/Game/TargetSigScanner.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.IoC.Internal;
|
||||
|
||||
namespace Dalamud.Game;
|
||||
|
||||
/// <summary>
|
||||
/// A SigScanner facilitates searching for memory signatures in a given ProcessModule.
|
||||
/// </summary>
|
||||
[PluginInterface]
|
||||
[InterfaceVersion("1.0")]
|
||||
#pragma warning disable SA1015
|
||||
[ResolveVia<ISigScanner>]
|
||||
#pragma warning restore SA1015
|
||||
internal class TargetSigScanner : SigScanner, IServiceType
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TargetSigScanner"/> class.
|
||||
/// </summary>
|
||||
/// <param name="doCopy">Whether or not to copy the module upon initialization for search operations to use, as to not get disturbed by possible hooks.</param>
|
||||
/// <param name="cacheFile">File used to cached signatures.</param>
|
||||
public TargetSigScanner(bool doCopy = false, FileInfo? cacheFile = null)
|
||||
: base(Process.GetCurrentProcess().MainModule!, doCopy, cacheFile)
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue