Skip to content

Commit 5040839

Browse files
committed
Sync with current ReClass.NET project.
1 parent f2d4fc8 commit 5040839

6 files changed

+21
-27
lines changed

MemoryPipePlugin.sln

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27004.2002
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MemoryPipePlugin", "Plugin\MemoryPipePlugin.csproj", "{CA79BA0B-0D80-476A-B793-FC7EF6DCEAD8}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReClass.NET", "..\ReClass.NET\ReClass.NET.csproj", "{BFB8917D-E9B4-463F-A6E8-612C35728C78}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReClass.NET", "..\ReClass.NET\ReClass.NET\ReClass.NET.csproj", "{BFB8917D-E9B4-463F-A6E8-612C35728C78}"
99
EndProject
1010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PipeServer", "PipeServer\PipeServer.vcxproj", "{75CAA2A9-D512-40E0-8918-B7F87806805E}"
1111
EndProject
@@ -45,4 +45,7 @@ Global
4545
GlobalSection(SolutionProperties) = preSolution
4646
HideSolutionNode = FALSE
4747
EndGlobalSection
48+
GlobalSection(ExtensibilityGlobals) = postSolution
49+
SolutionGuid = {002EFECF-F8EE-4634-878A-C0DE1E00EE03}
50+
EndGlobalSection
4851
EndGlobal

Plugin/HandleAbuserPluginExt.CoreProcessFunctions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public void EnumerateProcesses(EnumerateProcessCallback callbackProcess)
210210
foreach (var pipe in GetPipes())
211211
{
212212
var platform = new DirectoryInfo(pipe).Parent?.Name ?? string.Empty;
213-
#if WIN64
213+
#if RECLASSNET64
214214
if (platform.ToLower() == "x64")
215215
#else
216216
if (platform.ToLower() == "x86")

Plugin/MemoryPipePlugin.csproj

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<DebugType>full</DebugType>
1919
<Optimize>false</Optimize>
2020
<OutputPath>..\bin\Debug\x86\</OutputPath>
21-
<DefineConstants>TRACE;DEBUG;WIN32</DefineConstants>
21+
<DefineConstants>TRACE;DEBUG;RECLASSNET32</DefineConstants>
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
2424
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -28,7 +28,7 @@
2828
<DebugType>pdbonly</DebugType>
2929
<Optimize>true</Optimize>
3030
<OutputPath>..\bin\Release\x86\</OutputPath>
31-
<DefineConstants>TRACE;WIN32;RELEASE</DefineConstants>
31+
<DefineConstants>TRACE;RECLASSNET32;RELEASE</DefineConstants>
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
@@ -38,7 +38,7 @@
3838
<DebugType>full</DebugType>
3939
<Optimize>false</Optimize>
4040
<OutputPath>..\bin\Debug\x64\</OutputPath>
41-
<DefineConstants>TRACE;DEBUG;WIN64</DefineConstants>
41+
<DefineConstants>TRACE;DEBUG;RECLASSNET64</DefineConstants>
4242
<ErrorReport>prompt</ErrorReport>
4343
<WarningLevel>4</WarningLevel>
4444
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
@@ -48,7 +48,7 @@
4848
<DebugType>pdbonly</DebugType>
4949
<Optimize>true</Optimize>
5050
<OutputPath>..\bin\Release\x64\</OutputPath>
51-
<DefineConstants>TRACE;WIN64;RELEASE</DefineConstants>
51+
<DefineConstants>TRACE;RECLASSNET64;RELEASE</DefineConstants>
5252
<ErrorReport>prompt</ErrorReport>
5353
<WarningLevel>4</WarningLevel>
5454
</PropertyGroup>
@@ -79,12 +79,6 @@
7979
<DependentUpon>Resources.resx</DependentUpon>
8080
</Compile>
8181
</ItemGroup>
82-
<ItemGroup>
83-
<ProjectReference Include="..\..\ReClass.NET\ReClass.NET.csproj">
84-
<Project>{BFB8917D-E9B4-463F-A6E8-612C35728C78}</Project>
85-
<Name>ReClass.NET</Name>
86-
</ProjectReference>
87-
</ItemGroup>
8882
<ItemGroup>
8983
<EmbeddedResource Include="Properties\Resources.resx">
9084
<Generator>ResXFileCodeGenerator</Generator>
@@ -95,6 +89,12 @@
9589
<ItemGroup>
9690
<None Include="Resources\logo.png" />
9791
</ItemGroup>
92+
<ItemGroup>
93+
<ProjectReference Include="..\..\ReClass.NET\ReClass.NET\ReClass.NET.csproj">
94+
<Project>{bfb8917d-e9b4-463f-a6e8-612c35728c78}</Project>
95+
<Name>ReClass.NET</Name>
96+
</ProjectReference>
97+
</ItemGroup>
9898
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
9999
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
100100
Other similar extension points exist, see Microsoft.Common.targets.

Plugin/MemoryPipePluginExt.cs

+3-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.IO.Pipes;
77
using System.Linq;
88
using ReClassNET.Core;
9-
using ReClassNET.Debugger;
109
using ReClassNET.Plugins;
1110

1211
namespace MemoryPipePlugin
@@ -15,7 +14,7 @@ public partial class MemoryPipePluginExt : Plugin, ICoreProcessFunctions
1514
{
1615
private const string PipePrefix = @"\\.\pipe\";
1716

18-
private object sync = new object();
17+
private readonly object sync = new object();
1918

2019
private IPluginHost host;
2120

@@ -34,12 +33,7 @@ public override bool Initialize(IPluginHost host)
3433
Terminate();
3534
}
3635

37-
if (host == null)
38-
{
39-
throw new ArgumentNullException(nameof(host));
40-
}
41-
42-
this.host = host;
36+
this.host = host ?? throw new ArgumentNullException(nameof(host));
4337

4438
host.Process.CoreFunctions.RegisterFunctions("Memory Pipe", this);
4539

@@ -64,8 +58,7 @@ public override void Terminate()
6458
/// <returns>The client or null if the identifier doesn't exist.</returns>
6559
private MessageClient GetClientById(IntPtr id)
6660
{
67-
MessageClient client;
68-
openPipes.TryGetValue(id, out client);
61+
openPipes.TryGetValue(id, out var client);
6962
return client;
7063
}
7164

Plugin/MessageClient.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ public IMessage Receive()
5252
{
5353
var type = (MessageType)br.ReadInt32();
5454

55-
Func<IMessage> createFn;
56-
if (registeredMessages.TryGetValue(type, out createFn))
55+
if (registeredMessages.TryGetValue(type, out var createFn))
5756
{
5857
var message = createFn();
5958
message.ReadFrom(br);

Plugin/Messages.cs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Diagnostics.Contracts;
33
using System.IO;
44
using ReClassNET.Memory;
5-
using ReClassNET.Util;
65

76
namespace MemoryPipePlugin
87
{

0 commit comments

Comments
 (0)