-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathSamplePluginHybridExt.cpp
More file actions
33 lines (27 loc) · 1016 Bytes
/
SamplePluginHybridExt.cpp
File metadata and controls
33 lines (27 loc) · 1016 Bytes
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
#include "SamplePluginHybridExt.h"
namespace SamplePluginHybrid
{
/// <summary>This method gets called when ReClass.NET loads the plugin.</summary>
bool SamplePluginHybridExt::Initialize(IPluginHost^ host)
{
this->host = host;
return true;
}
/// <summary>This method gets called when ReClass.NET unloads the plugin.</summary>
void SamplePluginHybridExt::Terminate()
{
host = nullptr;
}
IReadOnlyList<INodeInfoReader^>^ SamplePluginHybridExt::GetNodeInfoReaders()
{
// Register a node info reader to display custom data on nodes.
auto reader = gcnew List<INodeInfoReader^>();
reader->Add(gcnew SampleNodeInfoReader);
return reader;
}
/// <summary>This method lets ReClass.NET print the name and the value of the node.</summary>
String^ SampleNodeInfoReader::ReadNodeInfo(BaseHexCommentNode^ node, IRemoteMemoryReader^ reader, MemoryBuffer^ memory, IntPtr nodeAddress, IntPtr nodeValue)
{
return node->Name + "@" + nodeAddress.ToString("X") + " => " + nodeValue.ToString("X");
}
}