-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathExamplePlugin.cs
More file actions
39 lines (33 loc) · 1.03 KB
/
ExamplePlugin.cs
File metadata and controls
39 lines (33 loc) · 1.03 KB
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
38
39
using Dotx64Dbg;
using System;
// Plugin Entry.
// The hot-load system will try to preserve all members of all classes
// during the reload. All the assigned values will persist accross
// compilations.
public partial class ExamplePlugin : IPlugin, IHotload
{
private NestedClass Nested = new();
private AssemblerTest Assembler = new AssemblerTest();
public ExamplePlugin()
{
// Writes to x64Dbg log.
Console.WriteLine("ExamplePlugin Constructor");
}
// Called as soon the plugin is fully initialized, this is called after
// the constructor and only once the for the initial plugin load.
public void Startup()
{
Console.WriteLine("ExamplePlugin Startup");
Nested.TestFunc();
}
// Called whenever code changes are hot-loaded.
public void OnHotload()
{
Console.WriteLine("Code got reloaded");
}
// Called before the plugin is about to be unloaded.
public void Shutdown()
{
Console.WriteLine("ExamplePlugin Shutdown");
}
}