~ruther/NosSmooth.Local

ref: 62bd0eaa6a2160cd9e0991ec24f1ab128da696f9 NosSmooth.Local/src/Core/NosSmooth.LocalBinding/Hooks/HookOptions.cs -rw-r--r-- 1.2 KiB
62bd0eaa — Rutherther feat(injector): inject nethost.dll prior to Inject dll to verify the injection won't fail on missing nethost 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
//  HookOptions.cs
//
//  Copyright (c) František Boháček. All rights reserved.
//  Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace NosSmooth.LocalBinding.Hooks;

/// <summary>
/// A configuration for hooking a function.
/// </summary>
/// <param name="Name">The name of the hook.</param>
/// <param name="Hook">Whether to hook the function.</param>
/// <param name="MemoryPattern">The memory pattern in hex. Use ?? for any bytes.</param>
/// <param name="Offset">The offset to find the function at.</param>
public record HookOptions
(
    string Name,
    bool Hook,
    string MemoryPattern,
    int Offset
);

/// <summary>
/// A configuration for hooking a function.
/// </summary>
/// <param name="Name">The name of the hook.</param>
/// <param name="Hook">Whether to hook the function.</param>
/// <param name="MemoryPattern">The memory pattern in hex. Use ?? for any bytes.</param>
/// <param name="Offset">The offset to find the function at.</param>
public record HookOptions<TFunction>
(
    string Name,
    bool Hook,
    string MemoryPattern,
    int Offset
) : HookOptions(Name, Hook, MemoryPattern, Offset);