Skip to content

Commit 4601141

Browse files
committed
Changed name of constant.
1 parent aa1db5e commit 4601141

File tree

10 files changed

+44
-44
lines changed

10 files changed

+44
-44
lines changed

ReClass.NET/Constants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ public class Constants
2121
#if RECLASSNET64
2222
public const string Platform = "x64";
2323

24-
public const string StringHexFormat = "X016";
24+
public const string AddressHexFormat = "X016";
2525
#else
2626
public const string Platform = "x86";
2727

28-
public const string StringHexFormat = "X08";
28+
public const string AddressHexFormat = "X08";
2929
#endif
3030

3131
public const string SettingsFile = "settings.xml";

ReClass.NET/DataExchange/Scanner/ReClassScanFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public void Save(IEnumerable<MemoryRecord> records, string filePath, ILogger log
141141
XmlRecordElement,
142142
new XAttribute(XmlValueTypeAttribute, r.ValueType.ToString()),
143143
new XAttribute(XmlDescriptionAttribute, r.Description ?? string.Empty),
144-
new XAttribute(XmlAddressAttribute, r.AddressOrOffset.ToString(Constants.StringHexFormat))
144+
new XAttribute(XmlAddressAttribute, r.AddressOrOffset.ToString(Constants.AddressHexFormat))
145145
);
146146
if (r.IsRelativeAddress)
147147
{

ReClass.NET/Forms/FoundCodeForm.cs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ public FoundCodeForm(RemoteProcess process, IntPtr address, HardwareBreakpointTr
4343

4444
if (trigger == HardwareBreakpointTrigger.Write)
4545
{
46-
Text = "Find out what writes to " + address.ToString(Constants.StringHexFormat);
46+
Text = "Find out what writes to " + address.ToString(Constants.AddressHexFormat);
4747
}
4848
else
4949
{
50-
Text = "Find out what accesses " + address.ToString(Constants.StringHexFormat);
50+
Text = "Find out what accesses " + address.ToString(Constants.AddressHexFormat);
5151
}
5252

5353
bannerBox.Text = Text;
@@ -88,7 +88,7 @@ private void foundCodeDataGridView_SelectionChanged(object sender, EventArgs e)
8888

8989
for (var i = 0; i < 5; ++i)
9090
{
91-
var code = $"{info.Instructions[i].Address.ToString(Constants.StringHexFormat)} - {info.Instructions[i].Instruction}";
91+
var code = $"{info.Instructions[i].Address.ToString(Constants.AddressHexFormat)} - {info.Instructions[i].Instruction}";
9292
if (i == 2)
9393
{
9494
sb.AppendLine(code + " <<<");
@@ -102,34 +102,34 @@ private void foundCodeDataGridView_SelectionChanged(object sender, EventArgs e)
102102
sb.AppendLine();
103103

104104
#if RECLASSNET64
105-
sb.AppendLine($"RAX = {info.DebugInfo.Registers.Rax.ToString(Constants.StringHexFormat)}");
106-
sb.AppendLine($"RBX = {info.DebugInfo.Registers.Rbx.ToString(Constants.StringHexFormat)}");
107-
sb.AppendLine($"RCX = {info.DebugInfo.Registers.Rcx.ToString(Constants.StringHexFormat)}");
108-
sb.AppendLine($"RDX = {info.DebugInfo.Registers.Rdx.ToString(Constants.StringHexFormat)}");
109-
sb.AppendLine($"RDI = {info.DebugInfo.Registers.Rdi.ToString(Constants.StringHexFormat)}");
110-
sb.AppendLine($"RSI = {info.DebugInfo.Registers.Rsi.ToString(Constants.StringHexFormat)}");
111-
sb.AppendLine($"RSP = {info.DebugInfo.Registers.Rsp.ToString(Constants.StringHexFormat)}");
112-
sb.AppendLine($"RBP = {info.DebugInfo.Registers.Rbp.ToString(Constants.StringHexFormat)}");
113-
sb.AppendLine($"RIP = {info.DebugInfo.Registers.Rip.ToString(Constants.StringHexFormat)}");
114-
115-
sb.AppendLine($"R8 = {info.DebugInfo.Registers.R8.ToString(Constants.StringHexFormat)}");
116-
sb.AppendLine($"R9 = {info.DebugInfo.Registers.R9.ToString(Constants.StringHexFormat)}");
117-
sb.AppendLine($"R10 = {info.DebugInfo.Registers.R10.ToString(Constants.StringHexFormat)}");
118-
sb.AppendLine($"R11 = {info.DebugInfo.Registers.R11.ToString(Constants.StringHexFormat)}");
119-
sb.AppendLine($"R12 = {info.DebugInfo.Registers.R12.ToString(Constants.StringHexFormat)}");
120-
sb.AppendLine($"R13 = {info.DebugInfo.Registers.R13.ToString(Constants.StringHexFormat)}");
121-
sb.AppendLine($"R14 = {info.DebugInfo.Registers.R14.ToString(Constants.StringHexFormat)}");
122-
sb.Append($"R15 = {info.DebugInfo.Registers.R15.ToString(Constants.StringHexFormat)}");
105+
sb.AppendLine($"RAX = {info.DebugInfo.Registers.Rax.ToString(Constants.AddressHexFormat)}");
106+
sb.AppendLine($"RBX = {info.DebugInfo.Registers.Rbx.ToString(Constants.AddressHexFormat)}");
107+
sb.AppendLine($"RCX = {info.DebugInfo.Registers.Rcx.ToString(Constants.AddressHexFormat)}");
108+
sb.AppendLine($"RDX = {info.DebugInfo.Registers.Rdx.ToString(Constants.AddressHexFormat)}");
109+
sb.AppendLine($"RDI = {info.DebugInfo.Registers.Rdi.ToString(Constants.AddressHexFormat)}");
110+
sb.AppendLine($"RSI = {info.DebugInfo.Registers.Rsi.ToString(Constants.AddressHexFormat)}");
111+
sb.AppendLine($"RSP = {info.DebugInfo.Registers.Rsp.ToString(Constants.AddressHexFormat)}");
112+
sb.AppendLine($"RBP = {info.DebugInfo.Registers.Rbp.ToString(Constants.AddressHexFormat)}");
113+
sb.AppendLine($"RIP = {info.DebugInfo.Registers.Rip.ToString(Constants.AddressHexFormat)}");
114+
115+
sb.AppendLine($"R8 = {info.DebugInfo.Registers.R8.ToString(Constants.AddressHexFormat)}");
116+
sb.AppendLine($"R9 = {info.DebugInfo.Registers.R9.ToString(Constants.AddressHexFormat)}");
117+
sb.AppendLine($"R10 = {info.DebugInfo.Registers.R10.ToString(Constants.AddressHexFormat)}");
118+
sb.AppendLine($"R11 = {info.DebugInfo.Registers.R11.ToString(Constants.AddressHexFormat)}");
119+
sb.AppendLine($"R12 = {info.DebugInfo.Registers.R12.ToString(Constants.AddressHexFormat)}");
120+
sb.AppendLine($"R13 = {info.DebugInfo.Registers.R13.ToString(Constants.AddressHexFormat)}");
121+
sb.AppendLine($"R14 = {info.DebugInfo.Registers.R14.ToString(Constants.AddressHexFormat)}");
122+
sb.Append($"R15 = {info.DebugInfo.Registers.R15.ToString(Constants.AddressHexFormat)}");
123123
#else
124-
sb.AppendLine($"EAX = {info.DebugInfo.Registers.Eax.ToString(Constants.StringHexFormat)}");
125-
sb.AppendLine($"EBX = {info.DebugInfo.Registers.Ebx.ToString(Constants.StringHexFormat)}");
126-
sb.AppendLine($"ECX = {info.DebugInfo.Registers.Ecx.ToString(Constants.StringHexFormat)}");
127-
sb.AppendLine($"EDX = {info.DebugInfo.Registers.Edx.ToString(Constants.StringHexFormat)}");
128-
sb.AppendLine($"EDI = {info.DebugInfo.Registers.Edi.ToString(Constants.StringHexFormat)}");
129-
sb.AppendLine($"ESI = {info.DebugInfo.Registers.Esi.ToString(Constants.StringHexFormat)}");
130-
sb.AppendLine($"ESP = {info.DebugInfo.Registers.Esp.ToString(Constants.StringHexFormat)}");
131-
sb.AppendLine($"EBP = {info.DebugInfo.Registers.Ebp.ToString(Constants.StringHexFormat)}");
132-
sb.Append($"EIP = {info.DebugInfo.Registers.Eip.ToString(Constants.StringHexFormat)}");
124+
sb.AppendLine($"EAX = {info.DebugInfo.Registers.Eax.ToString(Constants.AddressHexFormat)}");
125+
sb.AppendLine($"EBX = {info.DebugInfo.Registers.Ebx.ToString(Constants.AddressHexFormat)}");
126+
sb.AppendLine($"ECX = {info.DebugInfo.Registers.Ecx.ToString(Constants.AddressHexFormat)}");
127+
sb.AppendLine($"EDX = {info.DebugInfo.Registers.Edx.ToString(Constants.AddressHexFormat)}");
128+
sb.AppendLine($"EDI = {info.DebugInfo.Registers.Edi.ToString(Constants.AddressHexFormat)}");
129+
sb.AppendLine($"ESI = {info.DebugInfo.Registers.Esi.ToString(Constants.AddressHexFormat)}");
130+
sb.AppendLine($"ESP = {info.DebugInfo.Registers.Esp.ToString(Constants.AddressHexFormat)}");
131+
sb.AppendLine($"EBP = {info.DebugInfo.Registers.Ebp.ToString(Constants.AddressHexFormat)}");
132+
sb.Append($"EIP = {info.DebugInfo.Registers.Eip.ToString(Constants.AddressHexFormat)}");
133133
#endif
134134

135135
infoTextBox.Text = sb.ToString();

ReClass.NET/Forms/NamedAddressesForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private void removeAddressIconButton_Click(object sender, EventArgs e)
8383
private void DisplayNamedAddresses()
8484
{
8585
namedAddressesListBox.DataSource = process.NamedAddresses
86-
.Select(kv => new BindingDisplayWrapper<KeyValuePair<IntPtr, string>>(kv, v => $"0x{v.Key.ToString(Constants.StringHexFormat)}: {v.Value}"))
86+
.Select(kv => new BindingDisplayWrapper<KeyValuePair<IntPtr, string>>(kv, v => $"0x{v.Key.ToString(Constants.AddressHexFormat)}: {v.Value}"))
8787
.ToList();
8888

8989
namedAddressesListBox_SelectedIndexChanged(null, null);

ReClass.NET/Forms/ProcessInfoForm.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ await Task.Run(() =>
8282
delegate (Section section)
8383
{
8484
var row = sections.NewRow();
85-
row["address"] = section.Start.ToString(Constants.StringHexFormat);
86-
row["size"] = section.Size.ToString(Constants.StringHexFormat);
85+
row["address"] = section.Start.ToString(Constants.AddressHexFormat);
86+
row["size"] = section.Size.ToString(Constants.AddressHexFormat);
8787
row["name"] = section.Name;
8888
row["protection"] = section.Protection.ToString();
8989
row["type"] = section.Type.ToString();
@@ -96,8 +96,8 @@ await Task.Run(() =>
9696
var row = modules.NewRow();
9797
row["icon"] = NativeMethods.GetIconForFile(module.Path);
9898
row["name"] = module.Name;
99-
row["address"] = module.Start.ToString(Constants.StringHexFormat);
100-
row["size"] = module.Size.ToString(Constants.StringHexFormat);
99+
row["address"] = module.Start.ToString(Constants.AddressHexFormat);
100+
row["size"] = module.Size.ToString(Constants.AddressHexFormat);
101101
row["path"] = module.Path;
102102
row["module"] = module;
103103
modules.Rows.Add(row);

ReClass.NET/Forms/ScannerForm.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ private void SetGuiFromSettings(ScanSettings settings)
685685

686686
valueTypeComboBox.SelectedValue = settings.ValueType;
687687

688-
startAddressTextBox.Text = settings.StartAddress.ToString(Constants.StringHexFormat);
689-
stopAddressTextBox.Text = settings.StopAddress.ToString(Constants.StringHexFormat);
688+
startAddressTextBox.Text = settings.StartAddress.ToString(Constants.AddressHexFormat);
689+
stopAddressTextBox.Text = settings.StopAddress.ToString(Constants.AddressHexFormat);
690690

691691
fastScanCheckBox.Checked = settings.EnableFastScan;
692692
fastScanAlignmentTextBox.Text = Math.Max(1, settings.FastScanAlignment).ToString();

ReClass.NET/Memory/Disassembler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,6 @@ public DisassembledInstruction(ref InstructionData data)
277277
Instruction = data.Instruction;
278278
}
279279

280-
public override string ToString() => $"{Address.ToString(Constants.StringHexFormat)} - {Instruction}";
280+
public override string ToString() => $"{Address.ToString(Constants.AddressHexFormat)} - {Instruction}";
281281
}
282282
}

ReClass.NET/MemoryScanner/MemoryRecord.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public IntPtr AddressOrOffset
3434

3535
public IntPtr RealAddress { get; private set; }
3636

37-
public string AddressStr => RealAddress.ToString(Constants.StringHexFormat);
37+
public string AddressStr => RealAddress.ToString(Constants.AddressHexFormat);
3838

3939
public string ModuleName
4040
{

ReClass.NET/Nodes/BaseFunctionNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected void DisassembleRemoteCode(MemoryBuffer memory, IntPtr address, out in
6767

6868
instructions.Add(new FunctionNodeInstruction
6969
{
70-
Address = instruction.Address.ToString(Constants.StringHexFormat),
70+
Address = instruction.Address.ToString(Constants.AddressHexFormat),
7171
Data = string.Join(" ", instruction.Data.Take(instruction.Length).Select(b => $"{b:X2}")),
7272
Instruction = instruction.Instruction
7373
});

ReClass.NET/Nodes/BaseNode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ protected int AddAddressOffset(ViewInfo view, int x, int y)
249249

250250
if (view.Settings.ShowNodeAddress)
251251
{
252-
x = AddText(view, x, y, view.Settings.AddressColor, HotSpot.AddressId, view.Address.Add(Offset).ToString(Constants.StringHexFormat)) + view.Font.Width;
252+
x = AddText(view, x, y, view.Settings.AddressColor, HotSpot.AddressId, view.Address.Add(Offset).ToString(Constants.AddressHexFormat)) + view.Font.Width;
253253
}
254254

255255
return x;

0 commit comments

Comments
 (0)