Skip to content

Commit

Permalink
Updated: All the NuGet Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jun 25, 2022
1 parent 019ff16 commit 4d923d2
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.3.3" />
<PackageReference Include="CliWrap" Version="3.4.4" />
<PackageReference Include="NetCoreInstallChecker" Version="3.0.0" />
<PackageReference Include="RedistributableChecker" Version="0.2.3" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions source/Reloaded.Mod.Installer/Reloaded.Mod.Installer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<UseWPF>true</UseWPF>
<LangVersion>preview</LangVersion>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AssemblyName >Setup</AssemblyName>
<AssemblyName>Setup</AssemblyName>
<Nullable>enable</Nullable>
<ApplicationIcon>appicon.ico</ApplicationIcon>
</PropertyGroup>
Expand All @@ -22,7 +22,7 @@
</PackageReference>
<PackageReference Include="HandyControl" Version="3.2.0" />
<PackageReference Include="Onova" Version="2.6.2" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" >
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions source/Reloaded.Mod.Launcher.Kernel32AddressDumper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ static class Program
[STAThread]
static void Main()
{
IntPtr loadLibraryAddress = GetLoadLibraryAddress();
byte[] bytes = BitConverter.GetBytes((long) loadLibraryAddress);
nuint loadLibraryAddress = GetLoadLibraryAddress();
byte[] bytes = BitConverter.GetBytes((long) loadLibraryAddress);

var file = MemoryMappedFile.OpenExisting(SharedConstants.Kernel32AddressDumperMemoryMappedFileName);
var viewStream = file.CreateViewStream();
viewStream.Write(bytes, 0, bytes.Length);
}

private static IntPtr GetLoadLibraryAddress()
private static nuint GetLoadLibraryAddress()
{
var kernel32Handle = LoadLibraryW("kernel32");
return GetProcAddress(kernel32Handle, "LoadLibraryW");
}

[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);
private static extern nuint LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);

[DllImport("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
private static extern nuint GetProcAddress(nuint hModule, string procName);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Ninject" Version="3.3.4" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.0" />
<PackageReference Include="Ninject" Version="3.3.6" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
<PackageReference Include="PropertyChanged.Fody" Version="3.2.9">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1" />
<PackageReference Include="System.Management" Version="6.0.0" />
</ItemGroup>

Expand Down
26 changes: 13 additions & 13 deletions source/Reloaded.Mod.Launcher.Lib/Utility/BasicDllInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace Reloaded.Mod.Launcher.Lib.Utility;
/// </summary>
public class BasicDllInjector
{
private static IntPtr _x64LoadLibraryAddress;
private static IntPtr _x86LoadLibraryAddress;
private static nuint _x64LoadLibraryAddress;
private static nuint _x86LoadLibraryAddress;
private static bool _initialized;

private readonly Process _process;
Expand All @@ -45,21 +45,21 @@ public int Inject(string libraryPath)
PreloadAddresses();

var loadLibraryAddress = _process.Is64Bit() ? _x64LoadLibraryAddress : _x86LoadLibraryAddress;
IntPtr libraryNameMemoryAddress = WriteLoadLibraryParameter(libraryPath);
var libraryNameMemoryAddress = WriteLoadLibraryParameter(libraryPath);
int result = ExecuteFunction(loadLibraryAddress, libraryNameMemoryAddress);
_memory.Free(libraryNameMemoryAddress);
return result;
}

private IntPtr WriteLoadLibraryParameter(string libraryPath)
private nuint WriteLoadLibraryParameter(string libraryPath)
{
byte[] libraryNameBytes = Encoding.Unicode.GetBytes(libraryPath);
IntPtr processPointer = _memory.Allocate(libraryNameBytes.Length);
var processPointer = _memory.Allocate(libraryNameBytes.Length);
_memory.WriteRaw(processPointer, libraryNameBytes);
return processPointer;
}

private int ExecuteFunction(IntPtr address, IntPtr parameterAddress)
private int ExecuteFunction(nuint address, nuint parameterAddress)
{
IntPtr hThread = CreateRemoteThread(_process.Handle, IntPtr.Zero, IntPtr.Zero, address, parameterAddress, 0, out _);
WaitForSingleObject(hThread, unchecked((uint)-1));
Expand All @@ -69,13 +69,13 @@ private int ExecuteFunction(IntPtr address, IntPtr parameterAddress)

/* Helper functions */

private static IntPtr Getx64LoadLibraryAddress()
private static nuint Getx64LoadLibraryAddress()
{
var kernel32Handle = LoadLibraryW("kernel32");
return GetProcAddress(kernel32Handle, "LoadLibraryW");
}

private static IntPtr Getx86LoadLibraryAddress()
private static nuint Getx86LoadLibraryAddress()
{
// Setup Memory Mapped File for transfer.
var file = MemoryMappedFile.CreateOrOpen(SharedConstants.Kernel32AddressDumperMemoryMappedFileName, sizeof(long));
Expand All @@ -86,9 +86,9 @@ private static IntPtr Getx86LoadLibraryAddress()

var viewStream = file.CreateViewStream();
var reader = new BinaryReader(viewStream);
var result = (IntPtr)reader.ReadInt64();
var result = (nuint)reader.ReadInt64();

if (result == IntPtr.Zero)
if (result == 0)
throw new Exception(Resources.ErrorGetProcAddress32Failed.Get());

return result;
Expand All @@ -113,14 +113,14 @@ private static void PreloadAddresses()

#region Native Imports
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
private static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);
private static extern nuint LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);

[DllImport("kernel32.dll", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
private static extern nuint GetProcAddress(nuint hModule, string procName);

[DllImport("kernel32.dll")]
private static extern IntPtr CreateRemoteThread(IntPtr hProcess, IntPtr lpThreadAttributes, IntPtr dwStackSize,
IntPtr lpStartAddress, IntPtr lpParameter, uint dwCreationFlags, out IntPtr lpThreadId);
nuint lpStartAddress, nuint lpParameter, uint dwCreationFlags, out IntPtr lpThreadId);

[DllImport("kernel32.dll", SetLastError = true)]
private static extern uint WaitForSingleObject(IntPtr hHandle, uint dwMilliseconds);
Expand Down
10 changes: 5 additions & 5 deletions source/Reloaded.Mod.Launcher/Reloaded.Mod.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="gong-wpf-dragdrop" Version="2.2.0" />
<PackageReference Include="gong-wpf-dragdrop" Version="3.1.1" />
<PackageReference Include="HandyControl" Version="3.2.0-propertygrid" />
<PackageReference Include="HandyControl.Lang.en" Version="3.3.0" />
<PackageReference Include="Markdig.Wpf" Version="0.4.0" />
<PackageReference Include="Ninject" Version="3.3.4" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.0">
<PackageReference Include="Markdig.Wpf" Version="0.5.0.1" />
<PackageReference Include="Ninject" Version="3.3.6" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Reloaded.Memory" Version="6.1.3" />
<PackageReference Include="Reloaded.Memory" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions source/Reloaded.Mod.Loader.IO/Reloaded.Mod.Loader.IO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Equals.Fody" Version="4.0.1">
<PackageReference Include="Equals.Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="PropertyChanged.Fody" Version="3.2.9">
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Reloaded.Memory" Version="6.1.3" />
<PackageReference Include="Reloaded.Memory" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="34.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Moq" Version="4.14.5" />
<PackageReference Include="Bogus" Version="34.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="Moq" Version="4.18.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public CustomPackageSearchMetadata(PackageIdentity identity)
/// <inheritdoc />
public Uri ProjectUrl { get; set; }

/// <inheritdoc />
public Uri ReadmeUrl { get; }

/// <inheritdoc />
public Uri ReportAbuseUrl { get; set; }

Expand Down Expand Up @@ -79,4 +82,6 @@ public CustomPackageSearchMetadata(PackageIdentity identity)

/// <inheritdoc />
public LicenseMetadata LicenseMetadata { get; set; }

public IEnumerable<PackageVulnerabilityMetadata> Vulnerabilities { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DeepCloner" Version="0.10.3" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.39" />
<PackageReference Include="DeepCloner" Version="0.10.4" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.43" />
<PackageReference Include="NetCoreInstallChecker" Version="3.0.0" />
<PackageReference Include="NuGet.Packaging" Version="5.7.0" />
<PackageReference Include="NuGet.Packaging.Core" Version="5.7.0" />
<PackageReference Include="NuGet.Protocol" Version="5.7.0" />
<PackageReference Include="PropertyChanged.Fody" Version="3.2.9">
<PackageReference Include="NuGet.Packaging" Version="6.2.1" />
<PackageReference Include="NuGet.Packaging.Core" Version="6.2.1" />
<PackageReference Include="NuGet.Protocol" Version="6.2.1" />
<PackageReference Include="PropertyChanged.Fody" Version="3.4.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Equals.Fody" Version="4.0.1">
<PackageReference Include="Equals.Fody" Version="4.0.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="RedistributableChecker" Version="0.2.3" />
<PackageReference Include="Sewer56.Update.Resolvers.GitHub" Version="1.3.0" />
<PackageReference Include="Sewer56.Update.Resolvers.GitHub" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.1.0" />
<PackageReference Include="Reloaded.Mod.Interfaces" Version="2.2.0" />
<PackageReference Include="Reloaded.SharedLib.Hooks" Version="1.9.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions source/Tools/Reloaded.Publisher/Reloaded.Publisher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@


<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="FluentValidation" Version="10.3.4" />
<PackageReference Include="ShellProgressBar" Version="5.1.0" />
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="FluentValidation" Version="11.1.0" />
<PackageReference Include="ShellProgressBar" Version="5.2.0" />
</ItemGroup>


Expand Down

0 comments on commit 4d923d2

Please sign in to comment.