Initial CEF and DirectX overlay implementation (PoC, unfinished)

Still pretty unstable, game might crash at times.
Revamp build system and other small fixes
This commit is contained in:
sardelka9515
2022-11-05 18:35:39 +08:00
parent 2828b9b74f
commit 8961eb102b
97 changed files with 179796 additions and 204 deletions

View File

@ -2,9 +2,7 @@ name: Build test
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
branches:
- '**' # matches every branch
- '!main' # excludes main
- '!dev-nightly' # excludes nightly
@ -26,23 +24,27 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Restore nuget packages
run: nuget restore
- name: Build client and installer
run: dotnet build Client/Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client
- name: Build server win-x64
run: dotnet build Server/RageCoop.Server.csproj -o bin/Release/Server
- name: Build
run: build.cmd
- name: Upload server
uses: actions/upload-artifact@v3
with:
name: RageCoop.Server
path: bin/Release/Server
- name: Upload Client
uses: actions/upload-artifact@v3
with:
name: RageCoop.Client
path: bin/Release/Client
- uses: actions/checkout@v2

View File

@ -18,81 +18,69 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Restore nuget packages
run: nuget restore
- name: Build client and installer
run: dotnet build RageCoop.Client.Installer/RageCoop.Client.Installer.csproj --configuration Release -o bin/Release/Client/RageCoop
- name: Build server win-x64
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r win-x64 -o bin/Release/Server/win-x64 -c Release
- name: Build server linux-x64
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r linux-x64 -o bin/Release/Server/linux-x64 -c Release
- name: Build server linux-arm
run: dotnet publish RageCoop.Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r linux-arm -o bin/Release/Server/linux-arm -c Release
- name: Build artifacts
run: build.cmd
- name: Build server for different platforms
run: publish-server.cmd
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Client
dest: RageCoop.Client.zip
- uses: vimtor/action-zip@v1
with:
files: bin/API
dest: bin/Artifacts/SDK.zip
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/win-x64
dest: RageCoop.Server-win-x64.zip
dest: bin/Artifacts/RageCoop.Server-win-x64.zip
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/win-x86
dest: bin/Artifacts/RageCoop.Server-win-x86.zip
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/linux-x64
dest: RageCoop.Server-linux-x64.zip
dest: bin/Artifacts/RageCoop.Server-linux-x64.zip
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/linux-arm
dest: RageCoop.Server-linux-arm.zip
dest: bin/Artifacts/RageCoop.Server-linux-arm.zip
- uses: WebFreak001/deploy-nightly@v1.1.0
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/linux-arm
dest: bin/Artifacts/RageCoop.Server-linux-arm.zip
- uses: vimtor/action-zip@v1
with:
files: bin/Release/Server/linux-arm64
dest: bin/Artifacts/RageCoop.Server-linux-arm64.zip
- name: Deploy binaries
uses: Sardelka9515/deploy-nightly@v0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Client.zip
asset_name: RageCoop.Client.zip
upload_url: https://uploads.github.com/repos/RAGECOOP/GTAV-RESOURCES/releases/75463254/assets{?name,label}
release_id: 75463254
asset_path: bin/Artifacts
asset_content_type: application/zip
max_releases: 7
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-win-x64.zip
asset_name: RageCoop.Server-win-x64.zip
asset_content_type: application/zip
max_releases: 7
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-linux-x64.zip
asset_name: RageCoop.Server-linux-x64.zip
asset_content_type: application/zip
max_releases: 7
- uses: WebFreak001/deploy-nightly@v1.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # automatically provided by github actions
with:
upload_url: https://uploads.github.com/repos/RAGECOOP/RAGECOOP-V/releases/70603992/assets{?name,label}
release_id: 70603992
asset_path: RageCoop.Server-linux-arm.zip
asset_name: RageCoop.Server-linux-arm.zip
asset_content_type: application/zip
max_releases: 7
- uses: actions/checkout@v2

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@ -0,0 +1,297 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO.MemoryMappedFiles;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Ipc;
using System.Threading.Tasks;
using CefSharp;
using CefSharp.OffScreen;
using Microsoft.Win32.SafeHandles;
namespace RageCoop.Client.CefHost
{
public enum BufferMode
{
Full = 1,
Dirty = 2
}
public enum MouseButton
{
Left,
Middle,
Right
}
/// <summary>
/// Hosted by CefHost for managing cef instances.
/// </summary>
public class CefController : MarshalByRefObject, IDisposable
{
private static Process _host;
private static ActivatedClientTypeEntry _controllerEntry;
private static IpcChannel _adapterChannel;
public static Action<string> OnCefMessage;
private object _browser;
private MemoryMappedFile _mmf;
private string _mmfName;
private SafeMemoryMappedViewHandle _mmfView;
private BufferMode _mode;
public IntPtr PtrBuffer { get; private set; }
public void Dispose()
{
(_browser as ChromiumWebBrowser)?.Dispose();
_mmf?.Dispose();
if (PtrBuffer != IntPtr.Zero) _mmfView?.ReleasePointer();
_mmfView?.Dispose();
PtrBuffer = IntPtr.Zero;
_mmf = null;
_mmfView = null;
}
public static void Initialize(string fileName = "RageCoop.Client.CefHost.exe")
{
_host = new Process();
_host.StartInfo = new ProcessStartInfo
{
FileName = fileName,
UseShellExecute = false,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true
};
_host.EnableRaisingEvents = true;
_host.Start();
RegisterChannels(_host.StandardOutput.ReadLine());
Task.Run(() =>
{
while (_host?.HasExited == false) OnCefMessage?.Invoke("[CEF]: " + _host.StandardOutput.ReadLine());
});
Task.Run(() =>
{
while (_host?.HasExited == false)
OnCefMessage?.Invoke("[CEF][ERROR]: " + _host.StandardError.ReadLine());
});
}
public static void ShutDown()
{
if (_host == null) return;
_host.StandardInput.WriteLine("exit");
_host.WaitForExit(1000);
_host.Kill();
_host = null;
}
private static void RegisterChannels(string hostChannel)
{
var service = Guid.NewGuid().ToString();
Console.WriteLine("Registering adapter channel: " + service);
_adapterChannel = new IpcChannel(service);
ChannelServices.RegisterChannel(_adapterChannel, false);
_controllerEntry = new ActivatedClientTypeEntry(typeof(CefController), "ipc://" + hostChannel);
RemotingConfiguration.RegisterActivatedClientType(_controllerEntry);
Console.WriteLine("Registered controller entry: " + "ipc://" + hostChannel);
RemotingConfiguration.RegisterActivatedServiceType(typeof(CefAdapter));
Console.WriteLine("Registered service: " + nameof(CefAdapter));
_host.StandardInput.WriteLine("ipc://" + service);
}
/// <summary>
/// Called inside client process
/// </summary>
/// <param name="id"></param>
/// <param name="size"></param>
/// <param name="adapter"></param>
/// <param name="bufferMode"></param>
/// <param name="bufferSize"></param>
/// <returns></returns>
public static CefController Create(int id, Size size, out CefAdapter adapter, BufferMode bufferMode,
long bufferSize = 1024 * 1024 * 16)
{
if (RemotingConfiguration.IsRemotelyActivatedClientType(typeof(CefController)) == null)
throw new RemotingException();
var controller = new CefController();
controller.Activate(id, size, bufferMode, bufferSize);
adapter = CefAdapter.Adapters[id];
controller.Ping();
return controller;
}
public unsafe void Activate(int id, Size size, BufferMode mode = BufferMode.Dirty,
long sharedMemorySize = 1024 * 1024 * 16)
{
_mode = mode;
_mmfName = Guid.NewGuid().ToString();
// Set up shared memory
_mmf = MemoryMappedFile.CreateNew(_mmfName, sharedMemorySize);
_mmfView = _mmf.CreateViewAccessor().SafeMemoryMappedViewHandle;
byte* pBuf = null;
try
{
_mmfView.AcquirePointer(ref pBuf);
PtrBuffer = (IntPtr)pBuf;
}
catch
{
Dispose();
throw;
}
var adapter = new CefAdapter();
adapter.Register(id, mode, _mmfName);
_browser = new ChromiumWebBrowser();
((ChromiumWebBrowser)_browser).RenderHandler = new CefProcessor(size, adapter, PtrBuffer, mode);
Console.WriteLine("CefController created: " + size);
}
public void LoadUrl(string url)
{
((ChromiumWebBrowser)_browser).LoadUrl(url);
}
public void SendMouseClick(int x, int y, int modifiers, MouseButton button, bool mouseUp, int clicks)
{
var e = new MouseEvent(x, y, (CefEventFlags)modifiers);
((ChromiumWebBrowser)_browser).GetBrowserHost()
?.SendMouseClickEvent(e, (MouseButtonType)button, mouseUp, clicks);
}
public void SendMouseMove()
{
// _browser.GetBrowserHost() ?.SendMouseMoveEvent(,);
}
public DateTime Ping()
{
return DateTime.UtcNow;
;
}
public override object InitializeLifetimeService()
{
return null;
}
}
/// <summary>
/// Hosted by client for receiving rendering data
/// </summary>
public class CefAdapter : MarshalByRefObject, IDisposable
{
public delegate void PaintDelegate(int bufferSize, Rectangle dirtyRect);
public delegate void ResizeDelegate(Size newSize);
public static Dictionary<int, CefAdapter> Adapters = new Dictionary<int, CefAdapter>();
private MemoryMappedFile _mmf;
private SafeMemoryMappedViewHandle _mmfView;
public int Id;
public Size Size;
public CefAdapter()
{
Console.WriteLine("Adapter created");
}
public IntPtr PtrBuffer { get; private set; }
/// <summary>
/// Maximum buffer size for a paint event, use this property to allocate memory.
/// </summary>
/// <remarks>Value is equal to <see cref="Size" />*4, therefore will change upon resize</remarks>
public int MaxBufferSize => Size.Height * Size.Width * 4;
public BufferMode BufferMode { get; private set; }
public void Dispose()
{
_mmf?.Dispose();
if (PtrBuffer != IntPtr.Zero) _mmfView?.ReleasePointer();
_mmfView?.Dispose();
PtrBuffer = IntPtr.Zero;
_mmf = null;
_mmfView = null;
lock (Adapters)
{
if (Adapters.ContainsKey(Id)) Adapters.Remove(Id);
}
}
public event PaintDelegate OnPaint;
public event ResizeDelegate OnResize;
public void Resized(Size newSize)
{
Size = newSize;
OnResize?.Invoke(newSize);
}
public void Paint(Rectangle dirtyRect)
{
var size = BufferMode == BufferMode.Dirty
? dirtyRect.Width * dirtyRect.Height * 4
: Size.Width * Size.Height * 4;
OnPaint?.Invoke(size, dirtyRect);
}
public override object InitializeLifetimeService()
{
return null;
}
public unsafe void Register(int id, BufferMode mode, string mmfName)
{
lock (Adapters)
{
if (Adapters.ContainsKey(id)) throw new ArgumentException("Specified id is already used", nameof(id));
// Set up shared memory
_mmf = MemoryMappedFile.OpenExisting(mmfName);
_mmfView = _mmf.CreateViewAccessor().SafeMemoryMappedViewHandle;
byte* pBuf = null;
try
{
_mmfView.AcquirePointer(ref pBuf);
PtrBuffer = (IntPtr)pBuf;
}
catch
{
Dispose();
throw;
}
Id = id;
BufferMode = mode;
Adapters.Add(id, this);
}
}
/// <summary>
/// Ensure ipc connection
/// </summary>
/// <returns></returns>
public DateTime Ping()
{
return DateTime.UtcNow;
}
}
}

View File

@ -0,0 +1,128 @@
using System;
using System.Drawing;
using BitmapUtil;
using CefSharp;
using CefSharp.Enums;
using CefSharp.OffScreen;
using CefSharp.Structs;
using Size = System.Drawing.Size;
namespace RageCoop.Client.CefHost
{
internal class CefProcessor : IRenderHandler
{
private readonly CefAdapter _adapter;
private readonly BufferMode _mode;
private readonly IntPtr _pSharedBuffer;
private Rect _rect;
public CefProcessor(Size size, CefAdapter adapter, IntPtr pSharedBuffer, BufferMode mode)
{
_adapter = adapter;
_rect = new Rect(0, 0, size.Width, size.Height);
_pSharedBuffer = pSharedBuffer;
_mode = mode;
_adapter?.Resized(size);
}
public Size Size
{
get => new Size(_rect.Width, _rect.Height);
set
{
_rect = new Rect(0, 0, value.Width, value.Height);
_adapter?.Resized(value);
}
}
public void Dispose()
{
}
public ScreenInfo? GetScreenInfo()
{
return null;
}
public Rect GetViewRect()
{
return _rect;
}
public bool GetScreenPoint(int viewX, int viewY, out int screenX, out int screenY)
{
screenX = viewX;
screenY = viewY;
return true;
}
public void OnAcceleratedPaint(PaintElementType type, Rect dirtyRect, IntPtr sharedHandle)
{
}
public void OnPaint(PaintElementType type, Rect dirtyRect, IntPtr buffer, int width, int height)
{
var dirty = new Rectangle
{
Width = dirtyRect.Width,
Height = dirtyRect.Height,
X = dirtyRect.X,
Y = dirtyRect.Y
};
var source = new BitmapInfo
{
Width = width,
Height = height,
BytesPerPixel = 4,
Scan0 = buffer
};
switch (_mode)
{
case BufferMode.Dirty:
Unsafe.CopyRegion(source, _pSharedBuffer, dirty);
break;
case BufferMode.Full:
{
var target = source;
target.Scan0 = _pSharedBuffer;
Unsafe.UpdateRegion(source, target, dirty, dirty.Location);
break;
}
}
_adapter?.Paint(dirty);
}
public void OnCursorChange(IntPtr cursor, CursorType type, CursorInfo customCursorInfo)
{
}
public bool StartDragging(IDragData dragData, DragOperationsMask mask, int x, int y)
{
return true;
}
public void UpdateDragCursor(DragOperationsMask operation)
{
}
public void OnPopupShow(bool show)
{
}
public void OnPopupSize(Rect rect)
{
}
public void OnImeCompositionRangeChanged(Range selectedRange, Rect[] characterBounds)
{
;
}
public void OnVirtualKeyboardRequested(IBrowser browser, TextInputMode inputMode)
{
;
}
}
}

130
Client/CefHost/Program.cs Normal file
View File

@ -0,0 +1,130 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Ipc;
using System.Security.Permissions;
using System.Threading.Tasks;
using CefSharp;
using CefSharp.OffScreen;
namespace RageCoop.Client.CefHost
{
internal static class Program
{
[SecurityPermission(SecurityAction.Demand)]
private static void Main(string[] args)
{
Cef.Initialize(new CefSettings
{
BackgroundColor = 0x00
});
var name = Guid.NewGuid().ToString();
var channel = new IpcChannel(name);
ChannelServices.RegisterChannel(channel, false);
RemotingConfiguration.RegisterActivatedServiceType(typeof(CefController));
// Write to stdout so it can be read by the client
Console.WriteLine(name);
var adapterUrl = Console.ReadLine();
var adapterEntry = new ActivatedClientTypeEntry(typeof(CefAdapter), adapterUrl);
Console.WriteLine("Registered adapter entry: " + adapterUrl);
RemotingConfiguration.RegisterActivatedClientType(adapterEntry);
var channelData = (ChannelDataStore)channel.ChannelData;
foreach (var uri in channelData.ChannelUris) Console.WriteLine("Channel URI: {0}", uri);
Task.Run(() =>
{
try
{
Util.GetParentProcess().WaitForExit();
Console.WriteLine("Parent process terminated, exiting...");
Environment.Exit(0);
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
});
while (true)
switch (Console.ReadLine())
{
case "exit":
Cef.Shutdown();
Environment.Exit(0);
break;
}
}
}
/// <summary>
/// A utility class to determine a process parent.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct Util
{
// These members must match PROCESS_BASIC_INFORMATION
internal IntPtr Reserved1;
internal IntPtr PebBaseAddress;
internal IntPtr Reserved2_0;
internal IntPtr Reserved2_1;
internal IntPtr UniqueProcessId;
internal IntPtr InheritedFromUniqueProcessId;
[DllImport("ntdll.dll")]
private static extern int NtQueryInformationProcess(IntPtr processHandle, int processInformationClass,
ref Util processInformation, int processInformationLength, out int returnLength);
/// <summary>
/// Gets the parent process of the current process.
/// </summary>
/// <returns>An instance of the Process class.</returns>
public static Process GetParentProcess()
{
return GetParentProcess(Process.GetCurrentProcess().Handle);
}
/// <summary>
/// Gets the parent process of specified process.
/// </summary>
/// <param name="id">The process id.</param>
/// <returns>An instance of the Process class.</returns>
public static Process GetParentProcess(int id)
{
var process = Process.GetProcessById(id);
return GetParentProcess(process.Handle);
}
/// <summary>
/// Gets the parent process of a specified process.
/// </summary>
/// <param name="handle">The process handle.</param>
/// <returns>An instance of the Process class.</returns>
public static Process GetParentProcess(IntPtr handle)
{
var pbi = new Util();
int returnLength;
var status = NtQueryInformationProcess(handle, 0, ref pbi, Marshal.SizeOf(pbi), out returnLength);
if (status != 0)
throw new Win32Exception(status);
try
{
return Process.GetProcessById(pbi.InheritedFromUniqueProcessId.ToInt32());
}
catch (ArgumentException)
{
// not found
return null;
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("RageCoop.Client.CefHost")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RageCoop.Client.CefHost")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ba750e08-5e41-4b56-8ad5-875716d2ccea")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.props"
Condition="Exists('..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.props')" />
<Import Project="..\..\packages\cef.redist.x86.106.0.29\build\cef.redist.x86.props"
Condition="Exists('..\..\packages\cef.redist.x86.106.0.29\build\cef.redist.x86.props')" />
<Import Project="..\..\packages\cef.redist.x64.106.0.29\build\cef.redist.x64.props"
Condition="Exists('..\..\packages\cef.redist.x64.106.0.29\build\cef.redist.x64.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BA750E08-5E41-4B56-8AD5-875716D2CCEA}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>RageCoop.Client.CefHost</RootNamespace>
<AssemblyName>RageCoop.Client.CefHost</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<OutDir>..\..\bin\$(Configuration)\Client\SubProcess</OutDir>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="BitmapUtil">
<HintPath>..\..\libs\BitmapUtil.dll</HintPath>
</Reference>
<Reference
Include="CefSharp, Version=106.0.290.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"
PrivateAssets="All">
<HintPath>..\..\packages\CefSharp.Common.106.0.290\lib\net452\CefSharp.dll</HintPath>
</Reference>
<Reference
Include="CefSharp.Core, Version=106.0.290.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"
PrivateAssets="All">
<HintPath>..\..\packages\CefSharp.Common.106.0.290\lib\net452\CefSharp.Core.dll</HintPath>
</Reference>
<Reference
Include="CefSharp.OffScreen, Version=106.0.290.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=MSIL"
PrivateAssets="All">
<HintPath>..\..\packages\CefSharp.OffScreen.106.0.290\lib\net462\CefSharp.OffScreen.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CefController.cs" />
<Compile Include="CefProcessor.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\cef.redist.x64.106.0.29\build\cef.redist.x64.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x64.106.0.29\build\cef.redist.x64.props'))" />
<Error Condition="!Exists('..\..\packages\cef.redist.x86.106.0.29\build\cef.redist.x86.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\cef.redist.x86.106.0.29\build\cef.redist.x86.props'))" />
<Error Condition="!Exists('..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.props')"
Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.props'))" />
<Error Condition="!Exists('..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.targets')"
Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.targets'))" />
</Target>
<Import Project="..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.targets"
Condition="Exists('..\..\packages\CefSharp.Common.106.0.290\build\CefSharp.Common.targets')" />
<PropertyGroup>
<PostBuildEvent>
if not exist "ref" mkdir "ref"
copy "$(TargetFileName)" "ref\$(TargetName).dll" /y
copy "CefSharp.OffScreen.dll" "ref\CefSharp.OffScreen.dll" /y
copy "CefSharp.dll" "ref\CefSharp.dll" /y
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartAction>Program</StartAction>
<StartProgram>M:\SandBox-Shared\repos\RAGECOOP\RAGECOOP-V\bin\Debug\Client\SubProcess\RageCoop.Client.CefHost.exe</StartProgram>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="cef.redist.x64" version="106.0.29" targetFramework="net48" />
<package id="cef.redist.x86" version="106.0.29" targetFramework="net48" />
<package id="CefSharp.Common" version="106.0.290" targetFramework="net48" />
<package id="CefSharp.OffScreen" version="106.0.290" targetFramework="net48" />
</packages>

View File

@ -1,19 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>exe</OutputType>
<OutDir>..\..\bin\Debug\Client.DataDumper</OutDir>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="System.Data.HashFunction.Jenkins" Version="2.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\RageCoop.Core.csproj" />
</ItemGroup>
</Project>

View File

@ -5,6 +5,10 @@
<TargetFramework>net48</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<AllowedReferenceRelatedFileExtensions>
-
</AllowedReferenceRelatedFileExtensions>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>
<ItemGroup>
<None Remove="bg.png" />

View File

@ -9,26 +9,23 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>RageCoop.Client.Loader</RootNamespace>
<AssemblyName>RageCoop.Client.Loader</AssemblyName>
<OutPutPath>..\..\bin\$(Configuration)\Client\Loader</OutPutPath>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutPutPath>..\..\bin\Debug\Client\Loader</OutPutPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>DEBUG</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutPutPath>..\..\bin\Release\Client\Loader</OutPutPath>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>

View File

@ -0,0 +1,112 @@
using System;
using System.Drawing;
using DXHook.Hook.Common;
using GTA;
using RageCoop.Client.CefHost;
using RageCoop.Client.Scripting;
namespace RageCoop.Client.GUI
{
public class CefClient
{
public readonly int Id;
internal CefAdapter Adapter;
internal CefController Controller;
internal ImageElement MainFrame;
internal CefClient(int id, Size size)
{
Id = id;
Controller = CefController.Create(id, size, out Adapter, BufferMode.Full);
MainFrame = new ImageElement(size.Width, size.Height, 4, Adapter.PtrBuffer);
Adapter.OnPaint += (len, dirty) =>
{
try
{
// Image is using same shared buffer, so just need to make it re-copied to GPU
MainFrame.Invalidate();
}
catch (Exception ex)
{
API.Logger.Error(ex);
}
};
}
internal void Destroy()
{
Controller.Dispose();
Adapter.Dispose();
MainFrame.Dispose();
}
public Point GetLocationInFrame(Point screenPos)
{
screenPos.X -= MainFrame.Location.X;
screenPos.Y -= MainFrame.Location.Y;
return screenPos;
}
public Point GetLocationInCef(Point screenPos)
{
var p = GetLocationInFrame(screenPos);
p.X = (int)(p.X / Scale);
p.Y = (int)(p.Y / Scale);
return p;
}
internal bool PointInArea(Point screen)
{
screen = GetLocationInFrame(screen);
return screen.X.IsBetween(0, Width) && screen.Y.IsBetween(0, Height);
}
internal void Tick()
{
var mousePos = Util.CursorPosition;
if (!PointInArea(mousePos)) return;
var pos = GetLocationInCef(mousePos);
if (Game.IsControlJustPressed(Control.CursorAccept))
Controller.SendMouseClick(pos.X, pos.Y, 0, MouseButton.Left, false, 1);
else if (Game.IsControlJustReleased(Control.CursorAccept))
Controller.SendMouseClick(pos.X, pos.Y, 0, MouseButton.Left, true, 1);
}
#region FRAME-APPERANCE
public float Scale
{
get => MainFrame.Scale;
set => MainFrame.Scale = value;
}
public Color Tint
{
get => MainFrame.Tint;
set => MainFrame.Tint = value;
}
public byte Opacity
{
get => MainFrame.Opacity;
set => MainFrame.Opacity = value;
}
public Point Location
{
get => MainFrame.Location;
set => MainFrame.Location = value;
}
public int Width => MainFrame.Width;
public int Height => MainFrame.Height;
public bool Hidden
{
get => MainFrame.Hidden;
set => MainFrame.Hidden = value;
}
#endregion
}
}

View File

@ -0,0 +1,121 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using DXHook.Hook.Common;
using GTA;
using GTA.Native;
using RageCoop.Client.CefHost;
using RageCoop.Client.Scripting;
using RageCoop.Core;
namespace RageCoop.Client.GUI
{
internal static class CefManager
{
private static readonly ConcurrentDictionary<int, CefClient> Clients =
new ConcurrentDictionary<int, CefClient>();
private static readonly Overlay CefOverlay = new Overlay
{
Elements = new List<IOverlayElement>(),
Hidden = false
};
static CefManager()
{
Main.CefRunning = true;
HookManager.Initialize();
CefController.Initialize(@"RageCoop\SubProcess\RageCoop.Client.CefHost.exe");
CefController.OnCefMessage = m => API.Logger.Debug(m);
HookManager.AddOverLay(CefOverlay);
}
public static CefClient ActiveClient { get; set; }
public static void Test()
{
var c = CreateClient(new Size(640, 480));
c.Scale = 0.8f;
c.Opacity = 128;
Script.Wait(2000);
c.Controller.LoadUrl("https://ragecoop.online/");
ActiveClient = c;
}
public static void Tick()
{
if (ActiveClient != null)
{
Game.DisableAllControlsThisFrame();
Function.Call(Hash._SET_MOUSE_CURSOR_ACTIVE_THIS_FRAME);
ActiveClient.Tick();
}
}
public static void KeyDown(Keys key)
{
}
public static void KeyUp(Keys key)
{
}
public static bool DestroyClient(CefClient client)
{
lock (Clients)
{
if (Clients.TryRemove(client.Id, out var c) && client == c)
{
client.Destroy();
CefOverlay.Elements.Remove(client.MainFrame);
if (ActiveClient == client) ActiveClient = null;
return true;
}
}
return false;
}
public static CefClient CreateClient(Size size)
{
lock (Clients)
{
var id = 0;
while (id == 0 || Clients.ContainsKey(id)) id = CoreUtils.RandInt(0, int.MaxValue);
var client = new CefClient(id, size);
if (Clients.TryAdd(id, client))
{
CefOverlay.Elements.Add(client.MainFrame);
return client;
}
API.Logger.Warning("Failed to create CefClient");
client.Destroy();
return null;
}
}
public static void CleanUp()
{
Main.CefRunning = false;
ActiveClient = null;
try
{
lock (Clients)
{
foreach (var c in Clients.Values) DestroyClient(c);
Clients.Clear();
}
CefController.ShutDown();
}
catch (Exception ex)
{
API.Logger.Error(ex);
}
}
}
}

View File

@ -0,0 +1,61 @@
using System.Collections.Generic;
using DXHook.Hook;
using DXHook.Hook.Common;
using DXHook.Interface;
using RageCoop.Client.Scripting;
namespace RageCoop.Client.GUI
{
internal static class HookManager
{
public static readonly CaptureInterface Interface = new CaptureInterface();
private static DXHookD3D11 _hook;
public static Overlay DefaultOverlay = new Overlay();
public static bool Hooked => _hook != null;
public static void GetOverlays()
{
new List<IOverlay>(_hook.Overlays);
}
public static void AddOverLay(IOverlay ol)
{
_hook.Overlays.Add(ol);
_hook.IsOverlayUpdatePending = true;
}
public static void RemoveOverlay(IOverlay ol)
{
_hook.Overlays.Remove(ol);
_hook.IsOverlayUpdatePending = true;
}
public static void Initialize()
{
if (_hook != null) return;
_hook = new DXHookD3D11(Interface);
_hook.Config = new CaptureConfig
{
Direct3DVersion = Direct3DVersion.Direct3D11,
ShowOverlay = true
};
_hook.Overlays = new List<IOverlay>();
_hook.Hook();
_hook.OnPresent += Present;
DefaultOverlay.Elements = new List<IOverlayElement>();
AddOverLay(DefaultOverlay);
Interface.RemoteMessage += m => { API.Logger.Debug("DXHook: " + m.Message); };
API.Logger.Debug("Hooked DX3D11");
}
private static void Present()
{
}
public static void CleanUp()
{
_hook?.Cleanup();
_hook?.Dispose();
_hook = null;
}
}
}

View File

@ -12,6 +12,7 @@ using GTA.UI;
using LemonUI.Elements;
using LemonUI.Menus;
using Lidgren.Network;
using RageCoop.Client.GUI;
using RageCoop.Client.Menus;
using RageCoop.Client.Scripting;
using RageCoop.Core;
@ -49,6 +50,7 @@ namespace RageCoop.Client
public static Ped P;
public static float FPS;
private static bool _lastDead;
public static bool CefRunning;
/// <summary>
/// Don't use it!
@ -145,11 +147,13 @@ namespace RageCoop.Client
Aborted += OnAborted;
Tick += OnTick;
KeyDown += OnKeyDown;
KeyUp += OnKeyUp;
Util.NativeMemory();
Counter.Restart();
}
public static string LogPath => $"{Settings.DataDirectory}\\RageCoop.Client.log";
private static void OnAborted(object sender, EventArgs e)
@ -159,7 +163,7 @@ namespace RageCoop.Client
WorldThread.Instance?.Abort();
DevTool.Instance?.Abort();
ScriptDomain.CurrentDomain.Tick -= DomainTick;
Disconnected("Abort");
CleanUp("Abort");
WorldThread.DoQueuedActions();
}
catch (Exception ex)
@ -241,6 +245,10 @@ namespace RageCoop.Client
CoopMenu.MenuPool.Process();
#endif
if (CefRunning)
{
CefManager.Tick();
}
if (!Networking.IsOnServer)
{
@ -255,7 +263,8 @@ namespace RageCoop.Client
if (Networking.ShowNetworkInfo)
{
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 0),
$"L: {Networking.Latency * 1000:N0}ms", 0.5f) { Alignment = Alignment.Center }.Draw();
$"L: {Networking.Latency * 1000:N0}ms", 0.5f)
{ Alignment = Alignment.Center }.Draw();
new ScaledText(new PointF(Screen.PrimaryScreen.Bounds.Width / 2, 30),
$"R: {NetUtility.ToHumanReadable(Statistics.BytesDownPerSecond)}/s", 0.5f)
{ Alignment = Alignment.Center }.Draw();
@ -300,6 +309,14 @@ namespace RageCoop.Client
Ticked++;
}
private void OnKeyUp(object sender, KeyEventArgs e)
{
if (CefRunning)
{
CefManager.KeyUp(e.KeyCode);
}
}
private static void OnKeyDown(object sender, KeyEventArgs e)
{
if (MainChat.Focused)
@ -308,6 +325,11 @@ namespace RageCoop.Client
return;
}
if (CefRunning)
{
CefManager.KeyDown(e.KeyCode);
}
if (Networking.IsOnServer)
{
if (Voice.WasInitialized())
@ -317,7 +339,8 @@ namespace RageCoop.Client
Voice.StartRecording();
return;
}
else if (Voice.IsRecording())
if (Voice.IsRecording())
{
Voice.StopRecording();
return;
@ -380,37 +403,37 @@ namespace RageCoop.Client
}
else if (e.KeyCode == Settings.PassengerKey)
{
var P = Game.Player.Character;
if (!P.IsInVehicle())
if (P == null || P.IsInVehicle())
{
if (P.IsTaskActive(TaskType.CTaskEnterVehicle))
{
P.Task.ClearAll();
}
else
{
var V = World.GetClosestVehicle(P.ReadPosition(), 50);
return;
}
if (V != null)
if (P.IsTaskActive(TaskType.CTaskEnterVehicle))
{
P.Task.ClearAll();
}
else
{
var V = World.GetClosestVehicle(P.ReadPosition(), 15);
if (V != null)
{
var seat = P.GetNearestSeat(V);
var p = V.GetPedOnSeat(seat);
if (p != null && !p.IsDead)
{
var seat = P.GetNearestSeat(V);
var p = V.GetPedOnSeat(seat);
if (p != null && !p.IsDead)
for (int i = -1; i < V.PassengerCapacity; i++)
{
for (int i = -1; i < V.PassengerCapacity; i++)
seat = (VehicleSeat)i;
p = V.GetPedOnSeat(seat);
if (p == null || p.IsDead)
{
seat = (VehicleSeat)i;
p = V.GetPedOnSeat(seat);
if (p == null || p.IsDead)
{
break;
}
break;
}
}
P.Task.EnterVehicle(V, seat, -1, 5, EnterVehicleFlags.None);
}
P.Task.EnterVehicle(V, seat, -1, 5, EnterVehicleFlags.None);
}
}
}
@ -436,9 +459,14 @@ namespace RageCoop.Client
Logger.Info(">> Connected <<");
}
public static void Disconnected(string reason)
public static void CleanUp(string reason)
{
Logger.Info($">> Disconnected << reason: {reason}");
if (reason != "Abort")
{
Logger.Info($">> Disconnected << reason: {reason}");
API.QueueAction(() => { Notification.Show("~r~Disconnected: " + reason); });
}
API.QueueAction(() =>
{
if (MainChat.Focused)
@ -452,11 +480,12 @@ namespace RageCoop.Client
WorldThread.Traffic(true);
Function.Call(Hash.SET_ENABLE_VEHICLE_SLIPSTREAMING, false);
CoopMenu.DisconnectedMenuSetting();
Notification.Show("~r~Disconnected: " + reason);
LocalPlayerID = default;
Resources.Unload();
});
Memory.RestorePatches();
CefManager.CleanUp();
HookManager.CleanUp();
DownloadManager.Cleanup();
Voice.ClearAll();
}

View File

@ -3,6 +3,7 @@ using System.Drawing;
using GTA;
using GTA.UI;
using LemonUI.Menus;
using RageCoop.Client.GUI;
using RageCoop.Client.Loader;
namespace RageCoop.Client
@ -32,6 +33,14 @@ namespace RageCoop.Client
private static readonly NativeCheckboxItem ShowNetworkInfoItem =
new NativeCheckboxItem("Show Network Info", Networking.ShowNetworkInfo);
private static readonly NativeCheckboxItem DxHookTest =
new NativeCheckboxItem("Enable D3D11 hook", false);
private static readonly NativeCheckboxItem CefTest =
new NativeCheckboxItem("Test CEF overlay", false);
private static CefClient _testCef;
static DebugMenu()
{
Menu.Banner.Color = Color.FromArgb(225, 0, 0, 0);
@ -68,12 +77,43 @@ namespace RageCoop.Client
Main.Settings.ShowEntityOwnerName = ShowOwnerItem.Checked;
Util.SaveSettings();
};
DxHookTest.CheckboxChanged += Hook;
CefTest.CheckboxChanged += CefTestChange;
;
ReloadItem.Activated += ReloadDomain;
Menu.Add(SimulatedLatencyItem);
Menu.Add(ShowNetworkInfoItem);
Menu.Add(ShowOwnerItem);
Menu.Add(ReloadItem);
Menu.AddSubMenu(DiagnosticMenu);
Menu.Add(DxHookTest);
Menu.Add(CefTest);
}
private static void CefTestChange(object sender, EventArgs e)
{
if (CefTest.Checked)
{
_testCef = CefManager.CreateClient(new Size(640, 480));
_testCef.Scale = 0.8f;
_testCef.Opacity = 128;
Script.Wait(2000);
_testCef.Controller.LoadUrl("https://ragecoop.online/");
CefManager.ActiveClient = _testCef;
}
else
{
CefManager.DestroyClient(_testCef);
}
DxHookTest.Checked = HookManager.Hooked;
}
private static void Hook(object sender, EventArgs e)
{
if (DxHookTest.Checked)
HookManager.Initialize();
else
HookManager.CleanUp();
}
private static void ReloadDomain(object sender, EventArgs e)

View File

@ -80,7 +80,7 @@ namespace RageCoop.Client
break;
case NetConnectionStatus.Disconnected:
if (message.SenderConnection == ServerConnection) Main.Disconnected(reason);
if (message.SenderConnection == ServerConnection) Main.CleanUp(reason);
break;
}

View File

@ -1,4 +1,7 @@
using System.Reflection;

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information
@ -13,6 +16,7 @@ using System.Resources;
// Version informationr(
[assembly: AssemblyVersion("1.5.7.118")]
[assembly: AssemblyFileVersion("1.5.7.118")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: AssemblyVersion("1.5.7.351")]
[assembly: AssemblyFileVersion("1.5.7.351")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -2,6 +2,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -18,6 +19,14 @@
</NuGetPackageImportStamp>
<OutPutPath>..\..\bin\$(Configuration)\Client\Scripts</OutPutPath>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<AllowedReferenceRelatedFileExtensions>
.dll
.pdb
</AllowedReferenceRelatedFileExtensions>
<DocumentationFile>..\..\bin\API\RageCoop.Client.xml</DocumentationFile>
<DebugType>full</DebugType>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>DEBUG</DefineConstants>
@ -27,6 +36,9 @@
<ItemGroup>
<Compile Include="Debug.cs" />
<Compile Include="DevTools\DevTool.cs" />
<Compile Include="GUI\CefClient.cs" />
<Compile Include="GUI\CefManager.cs" />
<Compile Include="GUI\HookManager.cs" />
<Compile Include="Main.cs" />
<Compile Include="Menus\CoopMenu.cs" />
<Compile Include="Menus\Sub\DebugMenu.cs" />
@ -42,11 +54,6 @@
<Compile Include="Networking\Send.cs" />
<Compile Include="Networking\Statistics.cs" />
<Compile Include="PlayerList.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>AssemblyInfo.tt</DependentUpon>
</Compile>
<Compile Include="Scripting\API.cs" />
<Compile Include="Scripting\BaseScript.cs" />
<Compile Include="Scripting\ClientScript.cs" />
@ -73,9 +80,17 @@
<Compile Include="Util\Util.cs" />
<Compile Include="Util\VehicleExtensions.cs" />
<Compile Include="Util\WeaponUtil.cs" />
<Compile Include="Util\Win32.cs" />
<Compile Include="WorldThread.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="BitmapUtil, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\libs\BitmapUtil.dll</HintPath>
</Reference>
<Reference Include="DXHook">
<HintPath>..\..\libs\DXHook\DXHook.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.4.0.12, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\..\packages\SharpZipLib.1.4.0\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
@ -86,9 +101,6 @@
<HintPath>..\..\libs\Lidgren.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.ObjectPool, Version=6.0.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.ObjectPool.6.0.8\lib\net461\Microsoft.Extensions.ObjectPool.dll</HintPath>
</Reference>
<Reference Include="NAudio, Version=2.1.0.0, Culture=neutral, PublicKeyToken=e279aa5131008a41, processorArchitecture=MSIL">
<HintPath>..\..\packages\NAudio.2.1.0\lib\net472\NAudio.dll</HintPath>
</Reference>
@ -113,6 +125,10 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RageCoop.Client.CefHost, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\$(Configuration)\Client\SubProcess\ref\RageCoop.Client.CefHost.dll</HintPath>
</Reference>
<Reference Include="ScriptHookVDotNet">
<HintPath>..\..\libs\ScriptHookVDotNet.dll</HintPath>
</Reference>
@ -121,6 +137,12 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll</HintPath>
</Reference>
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
@ -131,10 +153,16 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="icon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Properties\AssemblyInfo.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>AssemblyInfo.cs</LastGenOutput>
</Content>
<Content Include="sharpdx_direct3d11_1_effects_x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
@ -149,8 +177,14 @@
<Name>RageCoop.Client.Loader</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup Condition=" '$(DevEnvDir)' != '*Undefined*'">
<PostBuildEvent>"$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"</PostBuildEvent>
<PropertyGroup>
<PostBuildEvent Condition=" '$(DevEnvDir)' != '*Undefined*'">
"$(DevEnvDir)TextTransform.exe" -a !!BuildConfiguration!$(Configuration) "$(ProjectDir)Properties\AssemblyInfo.tt"
</PostBuildEvent>
<PreBuildEvent Condition=" '$(SolutionDir)' != '*Undefined*'">
dotnet build -c $(Configuration) "$(SolutionDir)Client\CefHost\RageCoop.Client.CefHost.csproj"
</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=util/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@ -41,48 +41,6 @@ namespace RageCoop.Client.Scripting
#endregion
/// <summary>
/// Queue an action to be executed on next tick.
/// </summary>
/// <param name="a"></param>
public static void QueueAction(Action a)
{
WorldThread.QueueAction(a);
}
public static void QueueActionAndWait(Action a, int timeout = 15000)
{
var done = new AutoResetEvent(false);
Exception e = null;
QueueAction(() =>
{
try
{
a();
done.Set();
}
catch (Exception ex)
{
e = ex;
}
});
if (e != null)
throw e;
if (!done.WaitOne(timeout)) throw new TimeoutException();
}
/// <summary>
/// Queue an action to be executed on next tick, allowing you to call scripting API from another thread.
/// </summary>
/// <param name="a">
/// An <see cref="Func{T, TResult}" /> to be executed with a return value indicating whether it can be
/// removed after execution.
/// </param>
public static void QueueAction(Func<bool> a)
{
WorldThread.QueueAction(a);
}
/// <summary>
/// Client configuration, this will conflict with server-side config.
/// </summary>
@ -304,6 +262,49 @@ namespace RageCoop.Client.Scripting
#region FUNCTIONS
/// <summary>
/// Queue an action to be executed on next tick.
/// </summary>
/// <param name="a"></param>
public static void QueueAction(Action a)
{
WorldThread.QueueAction(a);
}
public static void QueueActionAndWait(Action a, int timeout = 15000)
{
var done = new AutoResetEvent(false);
Exception e = null;
QueueAction(() =>
{
try
{
a();
done.Set();
}
catch (Exception ex)
{
e = ex;
}
});
if (e != null)
throw e;
if (!done.WaitOne(timeout)) throw new TimeoutException();
}
/// <summary>
/// Queue an action to be executed on next tick, allowing you to call scripting API from another thread.
/// </summary>
/// <param name="a">
/// An <see cref="Func{T, TResult}" /> to be executed with a return value indicating whether it can be
/// removed after execution.
/// </param>
public static void QueueAction(Func<bool> a)
{
WorldThread.QueueAction(a);
}
/// <summary>
/// Connect to a server
/// </summary>

View File

@ -42,10 +42,10 @@ namespace RageCoop.Client
static Memory()
{
// Weapon/radio wheel slow-mo patch
// Thanks @CamxxCore, https://github.com/CamxxCore/GTAVWeaponWheelMod
// Thanks to @CamxxCore, https://github.com/CamxxCore/GTAVWeaponWheelMod
var result = NativeMemory.FindPattern("\x38\x51\x64\x74\x19", "xxxxx");
if (result == null)
throw new NotSupportedException("Can't find memory pattern to patch weapon/radio slow-mo");
throw new NotSupportedException("Can't find memory pattern to patch weapon/radio slowdown");
var address = result + 26;
address = address + *(int*)address + 4u;
VignettingPatch = new MemPatch(address, new byte[] { RET, 0x90, 0x90, 0x90, 0x90 });

View File

@ -20,6 +20,33 @@ namespace RageCoop.Client
{
public static string SettingsPath = "RageCoop\\Settings.json";
/// <summary>
/// The location of the cursor on screen between 0 and 1.
/// </summary>
public static PointF CursorPositionRelative
{
get
{
var cursorX = Game.IsControlEnabled(Control.CursorX)
? Game.GetControlValueNormalized(Control.CursorX)
: Game.GetDisabledControlValueNormalized(Control.CursorX);
var cursorY = Game.IsControlEnabled(Control.CursorY)
? Game.GetControlValueNormalized(Control.CursorY)
: Game.GetDisabledControlValueNormalized(Control.CursorY);
return new PointF(cursorX, cursorY);
}
}
public static Point CursorPosition
{
get
{
var p = CursorPositionRelative;
var res = Screen.Resolution;
return new Point((int)(p.X * res.Width), (int)(p.Y * res.Height));
}
}
public static SizeF ResolutionMaintainRatio
{
get

View File

@ -0,0 +1,469 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
// ReSharper disable InconsistentNaming
// ReSharper disable IdentifierTypo
// ReSharper disable UnusedMember.Local
namespace RageCoop.Client
{
internal class Win32
{
#region ENUM
/// <summary>
/// Enumerates the valid hook types passed as the idHook parameter into a call to SetWindowsHookEx.
/// </summary>
public enum HookType
{
/// <summary>
/// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box,
/// message box, menu, or scroll bar. For more information, see the MessageProc hook procedure.
/// </summary>
WH_MSGFILTER = -1,
/// <summary>
/// Installs a hook procedure that records input messages posted to the system message queue. This hook is
/// useful for recording macros. For more information, see the JournalRecordProc hook procedure.
/// </summary>
WH_JOURNALRECORD = 0,
/// <summary>
/// Installs a hook procedure that posts messages previously recorded by a WH_JOURNALRECORD hook procedure.
/// For more information, see the JournalPlaybackProc hook procedure.
/// </summary>
WH_JOURNALPLAYBACK = 1,
/// <summary>
/// Installs a hook procedure that monitors keystroke messages. For more information, see the KeyboardProc
/// hook procedure.
/// </summary>
WH_KEYBOARD = 2,
/// <summary>
/// Installs a hook procedure that monitors messages posted to a message queue. For more information, see the
/// GetMsgProc hook procedure.
/// </summary>
WH_GETMESSAGE = 3,
/// <summary>
/// Installs a hook procedure that monitors messages before the system sends them to the destination window
/// procedure. For more information, see the CallWndProc hook procedure.
/// </summary>
WH_CALLWNDPROC = 4,
/// <summary>
/// Installs a hook procedure that receives notifications useful to a CBT application. For more information,
/// see the CBTProc hook procedure.
/// </summary>
WH_CBT = 5,
/// <summary>
/// Installs a hook procedure that monitors messages generated as a result of an input event in a dialog box,
/// message box, menu, or scroll bar. The hook procedure monitors these messages for all applications in the
/// same desktop as the calling thread. For more information, see the SysMsgProc hook procedure.
/// </summary>
WH_SYSMSGFILTER = 6,
/// <summary>
/// Installs a hook procedure that monitors mouse messages. For more information, see the MouseProc hook
/// procedure.
/// </summary>
WH_MOUSE = 7,
/// <summary>
/// </summary>
WH_HARDWARE = 8,
/// <summary>
/// Installs a hook procedure useful for debugging other hook procedures. For more information, see the
/// DebugProc hook procedure.
/// </summary>
WH_DEBUG = 9,
/// <summary>
/// Installs a hook procedure that receives notifications useful to shell applications. For more information,
/// see the ShellProc hook procedure.
/// </summary>
WH_SHELL = 10,
/// <summary>
/// Installs a hook procedure that will be called when the application's foreground thread is about to become
/// idle. This hook is useful for performing low priority tasks during idle time. For more information, see the
/// ForegroundIdleProc hook procedure.
/// </summary>
WH_FOREGROUNDIDLE = 11,
/// <summary>
/// Installs a hook procedure that monitors messages after they have been processed by the destination window
/// procedure. For more information, see the CallWndRetProc hook procedure.
/// </summary>
WH_CALLWNDPROCRET = 12,
/// <summary>
/// Installs a hook procedure that monitors low-level keyboard input events. For more information, see the
/// LowLevelKeyboardProc hook procedure.
/// </summary>
WH_KEYBOARD_LL = 13,
/// <summary>
/// Installs a hook procedure that monitors low-level mouse input events. For more information, see the
/// LowLevelMouseProc hook procedure.
/// </summary>
WH_MOUSE_LL = 14
}
#endregion
public static Image CaptureWindow(IntPtr handle)
{
var windowDC = User32.GetWindowDC(handle);
var rECT = new RECT();
User32.GetWindowRect(handle, ref rECT);
var num = rECT.right - rECT.left;
var num1 = rECT.bottom - rECT.top;
var intPtr = GDI32.CreateCompatibleDC(windowDC);
var intPtr1 = GDI32.CreateCompatibleBitmap(windowDC, num, num1);
var intPtr2 = GDI32.SelectObject(intPtr, intPtr1);
GDI32.BitBlt(intPtr, 0, 0, num, num1, windowDC, 0, 0, 13369376);
GDI32.SelectObject(intPtr, intPtr2);
Image image = Image.FromHbitmap(intPtr1);
GDI32.DeleteObject(intPtr1);
GDI32.DeleteDC(intPtr);
User32.ReleaseDC(handle, windowDC);
return image;
}
public static void ClearLastError()
{
SetLastErrorEx(0, 0);
}
public static class GDI32
{
public const int SRCCOPY = 13369376;
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern bool BitBlt(IntPtr hObject, int nXDest, int nYDest, int nWidth, int nHeight,
IntPtr hObjectSource, int nXSrc, int nYSrc, int dwRop);
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int nWidth, int nHeight);
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr CreateCompatibleDC(IntPtr hDC);
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern bool DeleteDC(IntPtr hDC);
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr DeleteObject(IntPtr hObject);
[DllImport("gdi32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject);
}
public static class User32
{
[DllImport("user32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr GetDesktopWindow();
[DllImport("user32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr GetWindowDC(IntPtr hWnd);
[DllImport("user32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr GetWindowRect(IntPtr hWnd, ref RECT rect);
[DllImport("user32.dll", CharSet = CharSet.None, ExactSpelling = false)]
public static extern IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDC);
}
#region INPUT-HOOK
[DllImport("user32.dll", SetLastError = true)]
internal static extern void SetLastErrorEx(uint dwErrCode, uint dwType);
[DllImport("user32", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
public static extern IntPtr SetWindowsHookEx(HookType idHook, MouseProc lpfn, int hInstance, int threadId);
[DllImport("user32.dll", SetLastError = true)]
public static extern bool UnhookWindowsHookEx(IntPtr hhk);
[DllImport("user32", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
public static extern int CallNextHookEx(IntPtr idHook, int nCode, IntPtr wParam, IntPtr lParam);
[DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
public static extern int GetCurrentThreadId();
[DllImport("kernel32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall,
SetLastError = true)]
public static extern int GetModuleHandle(string lpModuleName);
public delegate int MouseProc(int nCode, IntPtr wParam, IntPtr lParam);
#endregion
#region WM-CONST
public const uint WM_ACTIVATE = 0x0006;
public const uint WM_ACTIVATEAPP = 0x001C;
public const uint WM_AFXFIRST = 0x0360;
public const uint WM_AFXLAST = 0x037F;
public const uint WM_APP = 0x8000;
public const uint WM_ASKCBFORMATNAME = 0x030C;
public const uint WM_CANCELJOURNAL = 0x004B;
public const uint WM_CANCELMODE = 0x001F;
public const uint WM_CAPTURECHANGED = 0x0215;
public const uint WM_CHANGECBCHAIN = 0x030D;
public const uint WM_CHANGEUISTATE = 0x0127;
public const uint WM_CHAR = 0x0102;
public const uint WM_CHARTOITEM = 0x002F;
public const uint WM_CHILDACTIVATE = 0x0022;
public const uint WM_CLEAR = 0x0303;
public const uint WM_CLOSE = 0x0010;
public const uint WM_CLIPBOARDUPDATE = 0x031D;
public const uint WM_COMMAND = 0x0111;
public const uint WM_COMPACTING = 0x0041;
public const uint WM_COMPAREITEM = 0x0039;
public const uint WM_CONTEXTMENU = 0x007B;
public const uint WM_COPY = 0x0301;
public const uint WM_COPYDATA = 0x004A;
public const uint WM_CREATE = 0x0001;
public const uint WM_CTLCOLORBTN = 0x0135;
public const uint WM_CTLCOLORDLG = 0x0136;
public const uint WM_CTLCOLOREDIT = 0x0133;
public const uint WM_CTLCOLORLISTBOX = 0x0134;
public const uint WM_CTLCOLORMSGBOX = 0x0132;
public const uint WM_CTLCOLORSCROLLBAR = 0x0137;
public const uint WM_CTLCOLORSTATIC = 0x0138;
public const uint WM_CUT = 0x0300;
public const uint WM_DEADCHAR = 0x0103;
public const uint WM_DELETEITEM = 0x002D;
public const uint WM_DESTROY = 0x0002;
public const uint WM_DESTROYCLIPBOARD = 0x0307;
public const uint WM_DEVICECHANGE = 0x0219;
public const uint WM_DEVMODECHANGE = 0x001B;
public const uint WM_DISPLAYCHANGE = 0x007E;
public const uint WM_DRAWCLIPBOARD = 0x0308;
public const uint WM_DRAWITEM = 0x002B;
public const uint WM_DROPFILES = 0x0233;
public const uint WM_ENABLE = 0x000A;
public const uint WM_ENDSESSION = 0x0016;
public const uint WM_ENTERIDLE = 0x0121;
public const uint WM_ENTERMENULOOP = 0x0211;
public const uint WM_ENTERSIZEMOVE = 0x0231;
public const uint WM_ERASEBKGND = 0x0014;
public const uint WM_EXITMENULOOP = 0x0212;
public const uint WM_EXITSIZEMOVE = 0x0232;
public const uint WM_FONTCHANGE = 0x001D;
public const uint WM_GETDLGCODE = 0x0087;
public const uint WM_GETFONT = 0x0031;
public const uint WM_GETHOTKEY = 0x0033;
public const uint WM_GETICON = 0x007F;
public const uint WM_GETMINMAXINFO = 0x0024;
public const uint WM_GETOBJECT = 0x003D;
public const uint WM_GETTEXT = 0x000D;
public const uint WM_GETTEXTLENGTH = 0x000E;
public const uint WM_HANDHELDFIRST = 0x0358;
public const uint WM_HANDHELDLAST = 0x035F;
public const uint WM_HELP = 0x0053;
public const uint WM_HOTKEY = 0x0312;
public const uint WM_HSCROLL = 0x0114;
public const uint WM_HSCROLLCLIPBOARD = 0x030E;
public const uint WM_ICONERASEBKGND = 0x0027;
public const uint WM_IME_CHAR = 0x0286;
public const uint WM_IME_COMPOSITION = 0x010F;
public const uint WM_IME_COMPOSITIONFULL = 0x0284;
public const uint WM_IME_CONTROL = 0x0283;
public const uint WM_IME_ENDCOMPOSITION = 0x010E;
public const uint WM_IME_KEYDOWN = 0x0290;
public const uint WM_IME_KEYLAST = 0x010F;
public const uint WM_IME_KEYUP = 0x0291;
public const uint WM_IME_NOTIFY = 0x0282;
public const uint WM_IME_REQUEST = 0x0288;
public const uint WM_IME_SELECT = 0x0285;
public const uint WM_IME_SETCONTEXT = 0x0281;
public const uint WM_IME_STARTCOMPOSITION = 0x010D;
public const uint WM_INITDIALOG = 0x0110;
public const uint WM_INITMENU = 0x0116;
public const uint WM_INITMENUPOPUP = 0x0117;
public const uint WM_INPUTLANGCHANGE = 0x0051;
public const uint WM_INPUTLANGCHANGEREQUEST = 0x0050;
public const uint WM_KEYDOWN = 0x0100;
public const uint WM_KEYFIRST = 0x0100;
public const uint WM_KEYLAST = 0x0108;
public const uint WM_KEYUP = 0x0101;
public const uint WM_KILLFOCUS = 0x0008;
public const uint WM_LBUTTONDBLCLK = 0x0203;
public const uint WM_LBUTTONDOWN = 0x0201;
public const uint WM_LBUTTONUP = 0x0202;
public const uint WM_MBUTTONDBLCLK = 0x0209;
public const uint WM_MBUTTONDOWN = 0x0207;
public const uint WM_MBUTTONUP = 0x0208;
public const uint WM_MDIACTIVATE = 0x0222;
public const uint WM_MDICASCADE = 0x0227;
public const uint WM_MDICREATE = 0x0220;
public const uint WM_MDIDESTROY = 0x0221;
public const uint WM_MDIGETACTIVE = 0x0229;
public const uint WM_MDIICONARRANGE = 0x0228;
public const uint WM_MDIMAXIMIZE = 0x0225;
public const uint WM_MDINEXT = 0x0224;
public const uint WM_MDIREFRESHMENU = 0x0234;
public const uint WM_MDIRESTORE = 0x0223;
public const uint WM_MDISETMENU = 0x0230;
public const uint WM_MDITILE = 0x0226;
public const uint WM_MEASUREITEM = 0x002C;
public const uint WM_MENUCHAR = 0x0120;
public const uint WM_MENUCOMMAND = 0x0126;
public const uint WM_MENUDRAG = 0x0123;
public const uint WM_MENUGETOBJECT = 0x0124;
public const uint WM_MENURBUTTONUP = 0x0122;
public const uint WM_MENUSELECT = 0x011F;
public const uint WM_MOUSEACTIVATE = 0x0021;
public const uint WM_MOUSEFIRST = 0x0200;
public const uint WM_MOUSEHOVER = 0x02A1;
public const uint WM_MOUSELAST = 0x020D;
public const uint WM_MOUSELEAVE = 0x02A3;
public const uint WM_MOUSEMOVE = 0x0200;
public const uint WM_MOUSEWHEEL = 0x020A;
public const uint WM_MOUSEHWHEEL = 0x020E;
public const uint WM_MOVE = 0x0003;
public const uint WM_MOVING = 0x0216;
public const uint WM_NCACTIVATE = 0x0086;
public const uint WM_NCCALCSIZE = 0x0083;
public const uint WM_NCCREATE = 0x0081;
public const uint WM_NCDESTROY = 0x0082;
public const uint WM_NCHITTEST = 0x0084;
public const uint WM_NCLBUTTONDBLCLK = 0x00A3;
public const uint WM_NCLBUTTONDOWN = 0x00A1;
public const uint WM_NCLBUTTONUP = 0x00A2;
public const uint WM_NCMBUTTONDBLCLK = 0x00A9;
public const uint WM_NCMBUTTONDOWN = 0x00A7;
public const uint WM_NCMBUTTONUP = 0x00A8;
public const uint WM_NCMOUSEHOVER = 0x02A0;
public const uint WM_NCMOUSELEAVE = 0x02A2;
public const uint WM_NCMOUSEMOVE = 0x00A0;
public const uint WM_NCPAINT = 0x0085;
public const uint WM_NCRBUTTONDBLCLK = 0x00A6;
public const uint WM_NCRBUTTONDOWN = 0x00A4;
public const uint WM_NCRBUTTONUP = 0x00A5;
public const uint WM_NCXBUTTONDBLCLK = 0x00AD;
public const uint WM_NCXBUTTONDOWN = 0x00AB;
public const uint WM_NCXBUTTONUP = 0x00AC;
public const uint WM_NCUAHDRAWCAPTION = 0x00AE;
public const uint WM_NCUAHDRAWFRAME = 0x00AF;
public const uint WM_NEXTDLGCTL = 0x0028;
public const uint WM_NEXTMENU = 0x0213;
public const uint WM_NOTIFY = 0x004E;
public const uint WM_NOTIFYFORMAT = 0x0055;
public const uint WM_NULL = 0x0000;
public const uint WM_PAINT = 0x000F;
public const uint WM_PAINTCLIPBOARD = 0x0309;
public const uint WM_PAINTICON = 0x0026;
public const uint WM_PALETTECHANGED = 0x0311;
public const uint WM_PALETTEISCHANGING = 0x0310;
public const uint WM_PARENTNOTIFY = 0x0210;
public const uint WM_PASTE = 0x0302;
public const uint WM_PENWINFIRST = 0x0380;
public const uint WM_PENWINLAST = 0x038F;
public const uint WM_POWER = 0x0048;
public const uint WM_POWERBROADCAST = 0x0218;
public const uint WM_PRINT = 0x0317;
public const uint WM_PRINTCLIENT = 0x0318;
public const uint WM_QUERYDRAGICON = 0x0037;
public const uint WM_QUERYENDSESSION = 0x0011;
public const uint WM_QUERYNEWPALETTE = 0x030F;
public const uint WM_QUERYOPEN = 0x0013;
public const uint WM_QUEUESYNC = 0x0023;
public const uint WM_QUIT = 0x0012;
public const uint WM_RBUTTONDBLCLK = 0x0206;
public const uint WM_RBUTTONDOWN = 0x0204;
public const uint WM_RBUTTONUP = 0x0205;
public const uint WM_RENDERALLFORMATS = 0x0306;
public const uint WM_RENDERFORMAT = 0x0305;
public const uint WM_SETCURSOR = 0x0020;
public const uint WM_SETFOCUS = 0x0007;
public const uint WM_SETFONT = 0x0030;
public const uint WM_SETHOTKEY = 0x0032;
public const uint WM_SETICON = 0x0080;
public const uint WM_SETREDRAW = 0x000B;
public const uint WM_SETTEXT = 0x000C;
public const uint WM_SETTINGCHANGE = 0x001A;
public const uint WM_SHOWWINDOW = 0x0018;
public const uint WM_SIZE = 0x0005;
public const uint WM_SIZECLIPBOARD = 0x030B;
public const uint WM_SIZING = 0x0214;
public const uint WM_SPOOLERSTATUS = 0x002A;
public const uint WM_STYLECHANGED = 0x007D;
public const uint WM_STYLECHANGING = 0x007C;
public const uint WM_SYNCPAINT = 0x0088;
public const uint WM_SYSCHAR = 0x0106;
public const uint WM_SYSCOLORCHANGE = 0x0015;
public const uint WM_SYSCOMMAND = 0x0112;
public const uint WM_SYSDEADCHAR = 0x0107;
public const uint WM_SYSKEYDOWN = 0x0104;
public const uint WM_SYSKEYUP = 0x0105;
public const uint WM_TCARD = 0x0052;
public const uint WM_TIMECHANGE = 0x001E;
public const uint WM_TIMER = 0x0113;
public const uint WM_UNDO = 0x0304;
public const uint WM_UNINITMENUPOPUP = 0x0125;
public const uint WM_USER = 0x0400;
public const uint WM_USERCHANGED = 0x0054;
public const uint WM_VKEYTOITEM = 0x002E;
public const uint WM_VSCROLL = 0x0115;
public const uint WM_VSCROLLCLIPBOARD = 0x030A;
public const uint WM_WINDOWPOSCHANGED = 0x0047;
public const uint WM_WINDOWPOSCHANGING = 0x0046;
public const uint WM_WININICHANGE = 0x001A;
public const uint WM_XBUTTONDBLCLK = 0x020D;
public const uint WM_XBUTTONDOWN = 0x020B;
public const uint WM_XBUTTONUP = 0x020C;
#endregion
#region STRUCT
[StructLayout(LayoutKind.Sequential)]
private struct MouseHookStructEx
{
public readonly MOUSEHOOKSTRUCT mouseHookStruct;
public readonly int MouseData;
}
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential)]
public struct Point
{
public int X;
public int Y;
}
[StructLayout(LayoutKind.Sequential)]
public struct MOUSEHOOKSTRUCT
{
public Point pt;
public IntPtr hwnd;
public uint wHitTestCode;
public IntPtr dwExtraInfo;
}
#endregion
}
}

View File

@ -7,6 +7,10 @@
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

BIN
Client/Scripts/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -24,6 +24,7 @@
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net48" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net48" />
<package id="System.Drawing.Common" version="4.5.0" targetFramework="net48" />
<package id="System.Globalization" version="4.3.0" targetFramework="net48" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
@ -33,7 +34,7 @@
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Linq" version="4.3.0" targetFramework="net48" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net48" />
<package id="System.Memory" version="4.5.4" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net48" />

Binary file not shown.

View File

@ -21,7 +21,7 @@ using Console = System.Console;
[assembly: InternalsVisibleTo("RageCoop.Server")]
[assembly: InternalsVisibleTo("RageCoop.Client")]
[assembly: InternalsVisibleTo("RageCoop.Client.Installer")]
[assembly: InternalsVisibleTo("RageCoop.Client.DataDumper")]
[assembly: InternalsVisibleTo("DataDumper")]
[assembly: InternalsVisibleTo("RageCoop.ResourceBuilder")]
namespace RageCoop.Core

View File

@ -86,10 +86,7 @@ namespace RageCoop.Core
Args[i] = m.ReadByteArray();
break;
default:
if (ResolveHandle == null)
{
throw new InvalidOperationException($"Unexpected type: {type}");
}
if (ResolveHandle == null) throw new InvalidOperationException($"Unexpected type: {type}");
Args[i] = ResolveHandle(type, m);
break;

View File

@ -9,12 +9,14 @@
<DebugType>embedded</DebugType>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;API</Configurations>
<OutDir>..\bin\$(Configuration)\Core</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutDir>..\bin\Debug\Core</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<OutDir>..\bin\Release\Core</OutDir>
<PropertyGroup Condition="'$(Configuration)' == 'API'">
<OutDir>..\bin\API</OutDir>
<Deterministic>true</Deterministic>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<WarningLevel>4</WarningLevel>

View File

@ -16,20 +16,29 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{531656CF-7269-488D-B042-741BC96C3941}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{12E29AB7-74C4-4250-8975-C02D7FFC2D7B}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Client.DataDumper", "Client\DataDumper\RageCoop.Client.DataDumper.csproj", "{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client.CefHost", "Client\CefHost\RageCoop.Client.CefHost.csproj", "{BA750E08-5E41-4B56-8AD5-875716D2CCEA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{70A1F09D-648D-4C8B-8947-E920B1A587A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefTest", "Tools\CefTest\CefTest.csproj", "{874944F4-2D01-4423-B55C-C651CCBA6630}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataDumper", "Tools\DataDumper\DataDumper.csproj", "{6387D897-09AF-4464-B440-80438E3BB8D0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
API|Any CPU = API|Any CPU
API|x64 = API|x64
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.API|Any CPU.ActiveCfg = API|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.API|Any CPU.Build.0 = API|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.API|x64.ActiveCfg = API|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.API|x64.Build.0 = API|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -38,6 +47,10 @@ Global
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Release|Any CPU.Build.0 = Release|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Release|x64.ActiveCfg = Release|Any CPU
{84AB99D9-5E00-4CA2-B1DD-56B8419AAD24}.Release|x64.Build.0 = Release|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.API|Any CPU.ActiveCfg = API|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.API|Any CPU.Build.0 = API|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.API|x64.ActiveCfg = API|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.API|x64.Build.0 = API|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -46,6 +59,10 @@ Global
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Release|Any CPU.Build.0 = Release|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Release|x64.ActiveCfg = Release|Any CPU
{CC2E8102-E568-4524-AA1F-F8E0F1CFE58A}.Release|x64.Build.0 = Release|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.API|Any CPU.ActiveCfg = API|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.API|Any CPU.Build.0 = API|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.API|x64.ActiveCfg = API|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.API|x64.Build.0 = API|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -54,6 +71,10 @@ Global
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Release|Any CPU.Build.0 = Release|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Release|x64.ActiveCfg = Release|Any CPU
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681}.Release|x64.Build.0 = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.API|Any CPU.ActiveCfg = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.API|Any CPU.Build.0 = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.API|x64.ActiveCfg = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.API|x64.Build.0 = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -62,6 +83,10 @@ Global
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|Any CPU.Build.0 = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.ActiveCfg = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.Build.0 = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|Any CPU.ActiveCfg = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|Any CPU.Build.0 = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|x64.ActiveCfg = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.API|x64.Build.0 = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -70,14 +95,42 @@ Global
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|Any CPU.Build.0 = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.ActiveCfg = Release|Any CPU
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.Build.0 = Release|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Debug|x64.ActiveCfg = Debug|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Debug|x64.Build.0 = Debug|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Release|Any CPU.Build.0 = Release|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Release|x64.ActiveCfg = Release|Any CPU
{F3DFDDC8-D5B1-4E96-959E-492AD7A8BA30}.Release|x64.Build.0 = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|Any CPU.ActiveCfg = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|Any CPU.Build.0 = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|x64.ActiveCfg = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.API|x64.Build.0 = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|x64.ActiveCfg = Debug|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Debug|x64.Build.0 = Debug|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|Any CPU.Build.0 = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|x64.ActiveCfg = Release|Any CPU
{BA750E08-5E41-4B56-8AD5-875716D2CCEA}.Release|x64.Build.0 = Release|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|Any CPU.ActiveCfg = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|Any CPU.Build.0 = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|x64.ActiveCfg = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.API|x64.Build.0 = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|Any CPU.Build.0 = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|x64.ActiveCfg = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Debug|x64.Build.0 = Debug|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|Any CPU.ActiveCfg = Release|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|Any CPU.Build.0 = Release|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|x64.ActiveCfg = Release|Any CPU
{874944F4-2D01-4423-B55C-C651CCBA6630}.Release|x64.Build.0 = Release|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.ActiveCfg = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|Any CPU.Build.0 = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|x64.ActiveCfg = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.API|x64.Build.0 = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Debug|x64.ActiveCfg = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Debug|x64.Build.0 = Debug|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Release|Any CPU.Build.0 = Release|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Release|x64.ActiveCfg = Release|Any CPU
{6387D897-09AF-4464-B440-80438E3BB8D0}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -86,6 +139,9 @@ Global
{EF56D109-1F22-43E0-9DFF-CFCFB94E0681} = {531656CF-7269-488D-B042-741BC96C3941}
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B} = {531656CF-7269-488D-B042-741BC96C3941}
{FC8CBDBB-6DC3-43AF-B34D-092E476410A5} = {531656CF-7269-488D-B042-741BC96C3941}
{BA750E08-5E41-4B56-8AD5-875716D2CCEA} = {531656CF-7269-488D-B042-741BC96C3941}
{874944F4-2D01-4423-B55C-C651CCBA6630} = {70A1F09D-648D-4C8B-8947-E920B1A587A3}
{6387D897-09AF-4464-B440-80438E3BB8D0} = {70A1F09D-648D-4C8B-8947-E920B1A587A3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6CC7EA75-E4FF-4534-8EB6-0AEECF2620B7}

View File

@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue">&lt;AssemblyExplorer&gt;&#xD;
&lt;Assembly Path="C:\Users\Sardelka\.nuget\packages\sharpziplib\1.4.0\lib\netstandard2.0\ICSharpCode.SharpZipLib.dll" /&gt;&#xD;
&lt;/AssemblyExplorer&gt;</s:String></wpf:ResourceDictionary>

View File

@ -1,4 +1,7 @@
using System.Reflection;

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information
@ -12,6 +15,7 @@ using System.Resources;
[assembly: AssemblyCulture("")]
// Version information
[assembly: AssemblyVersion("1.5.8.15")]
[assembly: AssemblyFileVersion("1.5.8.15")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: AssemblyVersion("1.5.8.32")]
[assembly: AssemblyFileVersion("1.5.8.32")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -20,13 +20,15 @@
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;API</Configurations>
<OutDir>..\bin\$(Configuration)\Server</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutDir>..\bin\Debug\Server</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<OutDir>..\bin\Release\Server</OutDir>
<PropertyGroup Condition="'$(Configuration)' == 'API'">
<OutDir>..\bin\API</OutDir>
<Deterministic>true</Deterministic>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<ProduceOnlyReferenceAssembly>true</ProduceOnlyReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>

View File

@ -30,7 +30,7 @@ public abstract class ServerObject
/// <summary>
/// Pass this as an argument in CustomEvent or NativeCall to convert this object to handle at client side.
/// </summary>
public Tuple<byte, byte[]> Handle => new Tuple<byte, byte[]>(GetTypeByte(), BitConverter.GetBytes(ID));
public Tuple<byte, byte[]> Handle => new(GetTypeByte(), BitConverter.GetBytes(ID));
/// <summary>
/// The client that owns this object, null if it's owned by server.
@ -280,7 +280,7 @@ public class ServerBlip
/// <summary>
/// Pass this as an argument in CustomEvent or NativeCall to convert this object to handle at client side.
/// </summary>
public Tuple<byte, byte[]> Handle => new Tuple<byte, byte[]>(60, BitConverter.GetBytes(ID));
public Tuple<byte, byte[]> Handle => new(60, BitConverter.GetBytes(ID));
/// <summary>
/// Network ID (not handle!)

7
Tools/CefTest/App.config Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{874944F4-2D01-4423-B55C-C651CCBA6630}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>CefTest</RootNamespace>
<AssemblyName>CefTest</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="BitmapUtil">
<HintPath>..\libs\BitmapUtil.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Common.4.5.0\lib\net461\System.Drawing.Common.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Client\CefHost\RageCoop.Client.CefHost.csproj">
<Project>{ba750e08-5e41-4b56-8ad5-875716d2ccea}</Project>
<Name>RageCoop.Client.CefHost</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

104
Tools/CefTest/Program.cs Normal file
View File

@ -0,0 +1,104 @@
using System.Drawing;
using System.Drawing.Imaging;
using System.Security.Permissions;
using System.Threading;
using System.Windows.Forms;
using RageCoop.Client.CefHost;
namespace CefTest
{
internal class Program
{
[SecurityPermission(SecurityAction.Demand)]
private static void Main(string[] args)
{
CefController.Initialize();
var thread = new Thread(() =>
{
var controller = CefController.Create(0, new Size(800, 600), out var adapter, BufferMode.Dirty);
Application.Run(new Test(adapter, controller));
});
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
var controller2 = CefController.Create(1, new Size(800, 600), out var adapter2, BufferMode.Full);
Application.Run(new Test2(adapter2, controller2));
}
}
internal class Test2 : Test
{
public Test2(CefAdapter adapter, CefController controller) : base(adapter, controller)
{
Text = "test2: full update";
}
protected override void CefPaint(int bufferSize, Rectangle dirtyRect)
{
lock (_adapter)
{
var size = _adapter.Size;
var draw = new Bitmap(size.Width, size.Height, size.Width * 4, PixelFormat.Format32bppArgb,
_adapter.PtrBuffer);
_graphics.DrawImage(draw, Point.Empty);
draw.Dispose();
}
}
}
internal class Test : Form
{
protected readonly CefAdapter _adapter;
protected readonly CefController _controller;
protected readonly Graphics _graphics;
public Test(CefAdapter adapter, CefController controller)
{
Text = "test1: partial update";
AutoScaleMode = AutoScaleMode.None;
Application.EnableVisualStyles();
Size = adapter.Size;
_adapter = adapter;
_controller = controller;
_adapter.OnPaint += CefPaint;
controller.LoadUrl("https://www.youtube.com/watch?v=w3rQ3328Tok");
KeyDown += TestForm_KeyDown;
MouseClick += TestForm_MouseClick;
BackColor = Color.AliceBlue;
_graphics = CreateGraphics();
}
private void TestForm_MouseClick(object sender, MouseEventArgs e)
{
_controller?.SendMouseClick(e.X, e.Y, 0, GetFrom(e.Button), false, 1);
_controller?.SendMouseClick(e.X, e.Y, 0, GetFrom(e.Button), true, 1);
}
public static MouseButton GetFrom(MouseButtons b)
{
switch (b)
{
case MouseButtons.Left: return MouseButton.Left;
case MouseButtons.Middle: return MouseButton.Middle;
case MouseButtons.Right: return MouseButton.Right;
default:
return MouseButton.Left;
}
}
private void TestForm_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.R) _controller.LoadUrl("https://www.youtube.com/watch?v=x53lfkuP044/");
}
protected virtual void CefPaint(int bufferSize, Rectangle dirtyRect)
{
lock (_adapter)
{
var draw = new Bitmap(dirtyRect.Width, dirtyRect.Height, dirtyRect.Width * 4,
PixelFormat.Format32bppArgb, _adapter.PtrBuffer);
_graphics.DrawImage(draw, dirtyRect.Location);
draw.Dispose();
}
}
}
}

View File

@ -0,0 +1,35 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CefTest")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CefTest")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("874944f4-2d01-4423-b55c-c651ccba6630")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Drawing.Common" version="4.5.0" targetFramework="net48" />
</packages>

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\RageCoop.Core.csproj" />
</ItemGroup>
</Project>

View File

@ -4,7 +4,7 @@ using Newtonsoft.Json;
using RageCoop.Core;
using Formatting = Newtonsoft.Json.Formatting;
namespace RageCoop.Client.DataDumper;
namespace DataDumper;
internal class WeaponInfo
{

7
build.cmd Normal file
View File

@ -0,0 +1,7 @@
if exist "bin" rmdir /s /q "bin"
dotnet build -c Release
dotnet build -c API Core\RageCoop.Core.csproj
dotnet build -c API Server\RageCoop.Server.csproj
cd %~dp0
copy .\Client\Scripts\obj\Release\ref\RageCoop.Client.dll .\bin\API\RageCoop.Client.dll /y
del .\bin\API\RageCoop.Server.exe

63
libs/BitmapUtil.deps.json Normal file
View File

@ -0,0 +1,63 @@
{
"runtimeTarget": {
"name": ".NETStandard,Version=v2.0/",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"BitmapUtil/1.0.0": {
"dependencies": {
"NETStandard.Library": "2.0.3",
"System.Drawing.Common": "4.5.0"
},
"runtime": {
"BitmapUtil.dll": {}
}
},
"Microsoft.NETCore.Platforms/1.1.0": {},
"NETStandard.Library/2.0.3": {
"dependencies": {
"Microsoft.NETCore.Platforms": "1.1.0"
}
},
"System.Drawing.Common/4.5.0": {
"runtime": {
"lib/netstandard2.0/System.Drawing.Common.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.6.26515.6"
}
}
}
}
},
"libraries": {
"BitmapUtil/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.NETCore.Platforms/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==",
"path": "microsoft.netcore.platforms/1.1.0",
"hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512"
},
"NETStandard.Library/2.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
"path": "netstandard.library/2.0.3",
"hashPath": "netstandard.library.2.0.3.nupkg.sha512"
},
"System.Drawing.Common/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-AiJFxxVPdeITstiRS5aAu8+8Dpf5NawTMoapZ53Gfirml24p7HIfhjmCRxdXnmmf3IUA3AX3CcW7G73CjWxW/Q==",
"path": "system.drawing.common/4.5.0",
"hashPath": "system.drawing.common.4.5.0.nupkg.sha512"
}
}
}

BIN
libs/BitmapUtil.dll Normal file

Binary file not shown.

BIN
libs/BitmapUtil.pdb Normal file

Binary file not shown.

86
libs/BitmapUtil.xml Normal file
View File

@ -0,0 +1,86 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BitmapUtil</name>
</assembly>
<members>
<member name="M:BitmapUtil.BitmapInfo.ToBitmap(System.Drawing.Imaging.PixelFormat)">
<summary>
Get a bitmap that use <see cref="F:BitmapUtil.BitmapInfo.Scan0"/> as the back buffer
</summary>
<param name="format"></param>
<returns></returns>
</member>
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Rectangle,System.Drawing.Point)">
<summary>
Copy a region from source and apply to specified point of target bitmap
</summary>
<param name="src"></param>
<param name="target"></param>
<param name="sourceRegion">Region to copy from source</param>
<param name="targetLocation">Location to apply the region copied from source</param>
</member>
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Point)">
<summary>
Copy a entire source bitmap to specified point of target bitmap
</summary>
<param name="src"></param>
<param name="target"></param>
<param name="location">The location of the target to apply source bitmap</param>
<returns></returns>
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
<exception cref="T:System.ArgumentException"></exception>
</member>
<member name="M:BitmapUtil.Unsafe.CopyRegion(BitmapUtil.BitmapInfo,System.IntPtr,System.Drawing.Rectangle)">
<summary>
Copy specified region to destination as a continuous region of memory, namely, crop the bitmap
</summary>
<param name="source">Source image</param>
<param name="destination">Pointer to destination buffer</param>
<param name="region">The region to copy from source</param>
<returns></returns>
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
</member>
<member name="T:BitmapUtil.GDIPlus">
<summary>
Common method and extensions for GDI+ (aka System.Drawing) Bitmap.
</summary>
</member>
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap)">
<summary>
Get a byte array from <para>bmp</para>
</summary>
<param name="bmp"></param>
<returns></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap,System.Drawing.Rectangle,BitmapUtil.BitmapInfo@)">
<summary>
Get a byte array from <para>bmp</para>
</summary>
<param name="bmp"></param>
<param name="region">The region to create copy</param>
<returns></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.FromByteArrayUnsafe(System.Byte[],System.Int32,System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
<summary>
Get a <see cref="T:System.Drawing.Bitmap"/> from specified array
</summary>
<param name="array"></param>
<param name="width"></param>
<param name="height"></param>
<param name="bytesPerPixel"></param>
<param name="format"></param>
<returns>The <see cref="T:System.Drawing.Bitmap"/> that depends on the specified array, note that it must not be collected by GC during the lifetime of this <see cref="T:System.Drawing.Bitmap"/></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.FromByteArray(System.Byte[],System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
<summary>
Grab a copy of input array and return a safe <see cref="T:System.Drawing.Bitmap"/> object.
</summary>
<param name="array"></param>
<param name="width"></param>
<param name="height"></param>
<param name="format"></param>
<returns></returns>
</member>
</members>
</doc>

BIN
libs/DXHook/BitmapUtil.dll Normal file

Binary file not shown.

BIN
libs/DXHook/BitmapUtil.pdb Normal file

Binary file not shown.

View File

@ -0,0 +1,86 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BitmapUtil</name>
</assembly>
<members>
<member name="M:BitmapUtil.BitmapInfo.ToBitmap(System.Drawing.Imaging.PixelFormat)">
<summary>
Get a bitmap that use <see cref="F:BitmapUtil.BitmapInfo.Scan0"/> as the back buffer
</summary>
<param name="format"></param>
<returns></returns>
</member>
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Rectangle,System.Drawing.Point)">
<summary>
Copy a region from source and apply to specified point of target bitmap
</summary>
<param name="src"></param>
<param name="target"></param>
<param name="sourceRegion">Region to copy from source</param>
<param name="targetLocation">Location to apply the region copied from source</param>
</member>
<member name="M:BitmapUtil.Unsafe.UpdateRegion(BitmapUtil.BitmapInfo,BitmapUtil.BitmapInfo,System.Drawing.Point)">
<summary>
Copy a entire source bitmap to specified point of target bitmap
</summary>
<param name="src"></param>
<param name="target"></param>
<param name="location">The location of the target to apply source bitmap</param>
<returns></returns>
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
<exception cref="T:System.ArgumentException"></exception>
</member>
<member name="M:BitmapUtil.Unsafe.CopyRegion(BitmapUtil.BitmapInfo,System.IntPtr,System.Drawing.Rectangle)">
<summary>
Copy specified region to destination as a continuous region of memory, namely, crop the bitmap
</summary>
<param name="source">Source image</param>
<param name="destination">Pointer to destination buffer</param>
<param name="region">The region to copy from source</param>
<returns></returns>
<exception cref="T:System.ArgumentOutOfRangeException"></exception>
</member>
<member name="T:BitmapUtil.GDIPlus">
<summary>
Common method and extensions for GDI+ (aka System.Drawing) Bitmap.
</summary>
</member>
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap)">
<summary>
Get a byte array from <para>bmp</para>
</summary>
<param name="bmp"></param>
<returns></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.ToByteArray(System.Drawing.Bitmap,System.Drawing.Rectangle,BitmapUtil.BitmapInfo@)">
<summary>
Get a byte array from <para>bmp</para>
</summary>
<param name="bmp"></param>
<param name="region">The region to create copy</param>
<returns></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.FromByteArrayUnsafe(System.Byte[],System.Int32,System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
<summary>
Get a <see cref="T:System.Drawing.Bitmap"/> from specified array
</summary>
<param name="array"></param>
<param name="width"></param>
<param name="height"></param>
<param name="bytesPerPixel"></param>
<param name="format"></param>
<returns>The <see cref="T:System.Drawing.Bitmap"/> that depends on the specified array, note that it must not be collected by GC during the lifetime of this <see cref="T:System.Drawing.Bitmap"/></returns>
</member>
<member name="M:BitmapUtil.GDIPlus.FromByteArray(System.Byte[],System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat)">
<summary>
Grab a copy of input array and return a safe <see cref="T:System.Drawing.Bitmap"/> object.
</summary>
<param name="array"></param>
<param name="width"></param>
<param name="height"></param>
<param name="format"></param>
<returns></returns>
</member>
</members>
</doc>

BIN
libs/DXHook/DXHook.dll Normal file

Binary file not shown.

BIN
libs/DXHook/DXHook.pdb Normal file

Binary file not shown.

865
libs/DXHook/DXHook.xml Normal file
View File

@ -0,0 +1,865 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>DXHook</name>
</assembly>
<members>
<member name="F:DXHook.CaptureProcess._channelName">
<summary>
Must be null to allow a random channel name to be generated
</summary>
</member>
<member name="M:DXHook.CaptureProcess.#ctor(System.Diagnostics.Process,DXHook.Interface.CaptureConfig,DXHook.Interface.CaptureInterface)">
<summary>
Prepares capturing in the target process. Note that the process must not already be hooked, and must have a <see cref="P:System.Diagnostics.Process.MainWindowHandle"/>.
</summary>
<param name="process">The process to inject into</param>
<exception cref="T:DXHook.ProcessHasNoWindowHandleException">Thrown if the <paramref name="process"/> does not have a window handle. This could mean that the process does not have a UI, or that the process has not yet finished starting.</exception>
<exception cref="T:DXHook.ProcessAlreadyHookedException">Thrown if the <paramref name="process"/> is already hooked</exception>
<exception cref="T:DXHook.InjectionFailedException">Thrown if the injection failed - see the InnerException for more details.</exception>
<remarks>The target process will have its main window brought to the foreground after successful injection.</remarks>
</member>
<member name="M:DXHook.CaptureProcess.BringProcessWindowToFront">
<summary>
Bring the target window to the front and wait for it to be visible
</summary>
<remarks>If the window does not come to the front within approx. 30 seconds an exception is raised</remarks>
</member>
<member name="M:DXHook.EntryPoint.StartCheckHostIsAliveThread">
<summary>
Begin a background thread to check periodically that the host process is still accessible on its IPC channel
</summary>
</member>
<member name="M:DXHook.EntryPoint.StopCheckHostIsAliveThread">
<summary>
Tell the _checkAlive thread that it can exit if it hasn't already
</summary>
</member>
<member name="T:DXHook.ProcessHasNoWindowHandleException">
<summary>
Indicates that the provided process does not have a window handle.
</summary>
</member>
<member name="P:DXHook.Hook.BaseDXHook.FPS">
<summary>
Frames Per second counter, FPS.Frame() must be called each frame
</summary>
</member>
<member name="M:DXHook.Hook.BaseDXHook.ReadFullStream(System.IO.Stream)">
<summary>
Reads data from a stream until the end is reached. The
data is returned as a byte array. An IOException is
thrown if any of the underlying IO calls fail.
</summary>
<param name="stream">The stream to read data from</param>
</member>
<member name="M:DXHook.Hook.BaseDXHook.ProcessCapture(System.Int32,System.Int32,System.Int32,System.Drawing.Imaging.PixelFormat,System.IntPtr,DXHook.Interface.ScreenshotRequest)">
<summary>
Process the capture based on the requested format.
</summary>
<param name="width">image width</param>
<param name="height">image height</param>
<param name="pitch">data pitch (bytes per row)</param>
<param name="format">target format</param>
<param name="pBits">IntPtr to the image data</param>
<param name="request">The original requets</param>
</member>
<member name="M:DXHook.Hook.Common.Element.Dispose(System.Boolean)">
<summary>
Releases unmanaged and optionally managed resources
</summary>
<param name="disposing">true if disposing both unmanaged and managed</param>
</member>
<member name="M:DXHook.Hook.Common.FramesPerSecond.Frame">
<summary>
Must be called each frame
</summary>
</member>
<member name="M:DXHook.Hook.Common.FramesPerSecond.GetFPS">
<summary>
Return the current frames per second
</summary>
<returns></returns>
</member>
<member name="P:DXHook.Hook.Common.ImageElement.PtrBuffer">
<summary>
Pointer to this image's underlying buffer area
</summary>
</member>
<member name="M:DXHook.Hook.Common.ImageElement.SetBitmap(System.Drawing.Bitmap)">
<summary>
Update current bitmap with supplied one
</summary>
<param name="bmp">The bitmap to replace current one with</param>
<remarks>Image buffer is copied to <see cref="P:DXHook.Hook.Common.ImageElement.PtrBuffer"/></remarks>
</member>
<member name="P:DXHook.Hook.Common.ImageElement.Tint">
<summary>
This value is multiplied with the source color (e.g. White will result in same color as source image)
</summary>
<remarks>
Defaults to <see cref="P:System.Drawing.Color.White"/>.
</remarks>
</member>
<member name="P:DXHook.Hook.Common.ImageElement.Location">
<summary>
The location of where to render this image element
</summary>
</member>
<member name="T:DXHook.Hook.Direct3DDevice9FunctionOrdinals">
<summary>
The full list of IDirect3DDevice9 functions with the correct index
</summary>
</member>
<member name="P:DXHook.Hook.DX11.DeviceManager.Direct3DDevice">
<summary>
Gets the Direct3D11 device.
</summary>
</member>
<member name="P:DXHook.Hook.DX11.DeviceManager.Direct3DContext">
<summary>
Gets the Direct3D11 immediate context.
</summary>
</member>
<member name="M:DXHook.Hook.DX11.DXOverlayEngine.Draw">
<summary>
Draw the overlay(s)
</summary>
</member>
<member name="M:DXHook.Hook.DX11.DXOverlayEngine.Dispose(System.Boolean)">
<summary>
Releases unmanaged and optionally managed resources
</summary>
<param name="disposing">true if disposing both unmanaged and managed</param>
</member>
<member name="M:DXHook.Hook.DX11.RendererBase.Initialize(DXHook.Hook.DX11.DeviceManager)">
<summary>
Initialize with the provided deviceManager
</summary>
<param name="deviceManager"></param>
</member>
<member name="M:DXHook.Hook.DX11.RendererBase.CreateDeviceDependentResources">
<summary>
Create any resources that depend on the device or device context
</summary>
</member>
<member name="M:DXHook.Hook.DX11.RendererBase.CreateSizeDependentResources">
<summary>
Create any resources that depend upon the size of the render target
</summary>
</member>
<member name="M:DXHook.Hook.DX11.RendererBase.Render">
<summary>
Render a frame
</summary>
</member>
<member name="M:DXHook.Hook.DX11.RendererBase.DoRender">
<summary>
Each descendant of RendererBase performs a frame
render within the implementation of DoRender
</summary>
</member>
<member name="M:DXHook.Hook.DX11.ScreenAlignedQuadRenderer.CreateDeviceDependentResources">
<summary>
Create any device dependent resources here.
This method will be called when the device is first
initialized or recreated after being removed or reset.
</summary>
</member>
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.Draw">
<summary>
Draw the overlay(s)
</summary>
</member>
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.BeforeDeviceReset">
<summary>
In Direct3D9 it is necessary to call OnLostDevice before any call to device.Reset(...) for certain interfaces found in D3DX (e.g. ID3DXSprite, ID3DXFont, ID3DXLine) - https://msdn.microsoft.com/en-us/library/windows/desktop/bb172979(v=vs.85).aspx
</summary>
</member>
<member name="M:DXHook.Hook.DX9.DXOverlayEngine.Dispose(System.Boolean)">
<summary>
Releases unmanaged and optionally managed resources
</summary>
<param name="disposing">true if disposing both unmanaged and managed</param>
</member>
<member name="T:DXHook.Hook.DXHookD3D10">
<summary>
Direct3D 10 Hook - this hooks the SwapChain.Present method to capture images
</summary>
</member>
<member name="T:DXHook.Hook.DXHookD3D10.DXGISwapChain_PresentDelegate">
<summary>
The IDXGISwapChain.Present function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D10.DXGISwapChain_ResizeTargetDelegate">
<summary>
The IDXGISwapChain.ResizeTarget function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D10.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
<summary>
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
</summary>
<param name="swapChainPtr"></param>
<param name="newTargetParameters"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D10.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
<summary>
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
</summary>
<param name="swapChainPtr"></param>
<param name="syncInterval"></param>
<param name="flags"></param>
<returns>The HRESULT of the original method</returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D10_1">
<summary>
Direct3D 10.1 Hook - this hooks the SwapChain.Present method to capture images
</summary>
</member>
<member name="T:DXHook.Hook.DXHookD3D10_1.DXGISwapChain_PresentDelegate">
<summary>
The IDXGISwapChain.Present function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D10_1.DXGISwapChain_ResizeTargetDelegate">
<summary>
The IDXGISwapChain.ResizeTarget function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D10_1.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
<summary>
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
</summary>
<param name="swapChainPtr"></param>
<param name="newTargetParameters"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D10_1.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
<summary>
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
</summary>
<param name="swapChainPtr"></param>
<param name="syncInterval"></param>
<param name="flags"></param>
<returns>The HRESULT of the original method</returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D11">
<summary>
Direct3D 11 Hook - this hooks the SwapChain.Present to take screenshots
</summary>
</member>
<member name="T:DXHook.Hook.DXHookD3D11.DXGISwapChain_PresentDelegate">
<summary>
The IDXGISwapChain.Present function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D11.DXGISwapChain_ResizeTargetDelegate">
<summary>
The IDXGISwapChain.ResizeTarget function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D11.ResizeTargetHook(System.IntPtr,SharpDX.DXGI.ModeDescription@)">
<summary>
Hooked to allow resizing a texture/surface that is reused. Currently not in use as we create the texture for each request
to support different sizes each time (as we use DirectX to copy only the region we are after rather than the entire backbuffer)
</summary>
<param name="swapChainPtr"></param>
<param name="newTargetParameters"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D11.PresentHook(System.IntPtr,System.Int32,SharpDX.DXGI.PresentFlags)">
<summary>
Our present hook that will grab a copy of the backbuffer when requested. Note: this supports multi-sampling (anti-aliasing)
</summary>
<param name="swapChainPtr"></param>
<param name="syncInterval"></param>
<param name="flags"></param>
<returns>The HRESULT of the original method</returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D11.ToStream(SharpDX.Direct3D11.DeviceContext,SharpDX.Direct3D11.Texture2D,DXHook.Interface.ImageFormat,System.IO.Stream)">
<summary>
Copies to a stream using WIC. The format is converted if necessary.
</summary>
<param name="context"></param>
<param name="texture"></param>
<param name="outputFormat"></param>
<param name="stream"></param>
</member>
<member name="M:DXHook.Hook.DXHookD3D9.Cleanup">
<summary>
Just ensures that the surface we created is cleaned up.
</summary>
</member>
<member name="T:DXHook.Hook.DXHookD3D9.Direct3D9Device_EndSceneDelegate">
<summary>
The IDirect3DDevice9.EndScene function definition
</summary>
<param name="device"></param>
<returns></returns>
</member>
<member name="T:DXHook.Hook.DXHookD3D9.Direct3D9Device_ResetDelegate">
<summary>
The IDirect3DDevice9.Reset function definition
</summary>
<param name="device"></param>
<param name="presentParameters"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D9.ResetHook(System.IntPtr,SharpDX.Direct3D9.PresentParameters@)">
<summary>
Reset the _renderTarget so that we are sure it will have the correct presentation parameters (required to support working across changes to windowed/fullscreen or resolution changes)
</summary>
<param name="devicePtr"></param>
<param name="presentParameters"></param>
<returns></returns>
</member>
<member name="M:DXHook.Hook.DXHookD3D9.EndSceneHook(System.IntPtr)">
<summary>
Hook for IDirect3DDevice9.EndScene
</summary>
<param name="devicePtr">Pointer to the IDirect3DDevice9 instance. Note: object member functions always pass "this" as the first parameter.</param>
<returns>The HRESULT of the original EndScene</returns>
<remarks>Remember that this is called many times a second by the Direct3D application - be mindful of memory and performance!</remarks>
</member>
<member name="M:DXHook.Hook.DXHookD3D9.DoCaptureRenderTarget(SharpDX.Direct3D9.Device,System.String)">
<summary>
Implementation of capturing from the render target of the Direct3D9 Device (or DeviceEx)
</summary>
<param name="device"></param>
</member>
<member name="T:DXHook.Hook.FramesPerSecond">
<summary>
Used to determine the FPS
</summary>
</member>
<member name="M:DXHook.Hook.FramesPerSecond.Frame">
<summary>
Must be called each frame
</summary>
</member>
<member name="M:DXHook.Hook.FramesPerSecond.GetFPS">
<summary>
Return the current frames per second
</summary>
<returns></returns>
</member>
<member name="T:DXHook.Hook.Hook`1">
<summary>
Extends <see cref="T:DXHook.Hook.Hook"/> with support for accessing the Original method from within a hook delegate
</summary>
<typeparam name="T">A delegate type</typeparam>
</member>
<member name="P:DXHook.Hook.Hook`1.Original">
<summary>
When called from within the <see cref="P:DXHook.Hook.Hook.NewFunc"/> delegate this will call the original function at <see cref="P:DXHook.Hook.Hook.FuncToHook"/>.
</summary>
</member>
<member name="M:DXHook.Hook.Hook`1.#ctor(System.IntPtr,System.Delegate,System.Object)">
<summary>
Creates a new hook at <paramref name="funcToHook"/> redirecting to <paramref name="newFunc"/>. The hook starts inactive so a call to <see cref="!:Activate"/> is required to enable the hook.
</summary>
<param name="funcToHook">A pointer to the location to insert the hook</param>
<param name="newFunc">The delegate to call from the hooked location</param>
<param name="owner">The object to assign as the "callback" object within the <see cref="T:EasyHook.LocalHook"/> instance.</param>
</member>
<member name="T:DXHook.Hook.Hook">
<summary>
Wraps the <see cref="T:EasyHook.LocalHook"/> class with a simplified active/inactive state
</summary>
</member>
<member name="P:DXHook.Hook.Hook.FuncToHook">
<summary>
The hooked function location
</summary>
</member>
<member name="P:DXHook.Hook.Hook.NewFunc">
<summary>
The replacement delegate
</summary>
</member>
<member name="P:DXHook.Hook.Hook.Owner">
<summary>
The callback object passed to LocalHook constructor
</summary>
</member>
<member name="P:DXHook.Hook.Hook.LocalHook">
<summary>
The <see cref="T:EasyHook.LocalHook"/> instance
</summary>
</member>
<member name="P:DXHook.Hook.Hook.IsActive">
<summary>
Indicates whether the hook is currently active
</summary>
</member>
<member name="M:DXHook.Hook.Hook.#ctor(System.IntPtr,System.Delegate,System.Object)">
<summary>
Creates a new hook at <paramref name="funcToHook"/> redirecting to <paramref name="newFunc"/>. The hook starts inactive so a call to <see cref="M:DXHook.Hook.Hook.Activate"/> is required to enable the hook.
</summary>
<param name="funcToHook">A pointer to the location to insert the hook</param>
<param name="newFunc">The delegate to call from the hooked location</param>
<param name="owner">The object to assign as the "callback" object within the <see cref="T:EasyHook.LocalHook"/> instance.</param>
</member>
<member name="M:DXHook.Hook.Hook.Activate">
<summary>
Activates the hook
</summary>
</member>
<member name="M:DXHook.Hook.Hook.Deactivate">
<summary>
Deactivates the hook
</summary>
</member>
<member name="T:DXHook.Hook.SafeHGlobal">
<summary>
Provides a safe handle around a block of unmanaged memory.
</summary>
</member>
<member name="P:DXHook.Hook.SafeHGlobal.IsInvalid">
<summary>
When overridden in a derived class, gets a value indicating whether the handle value is invalid.
</summary>
<returns>true if the handle value is invalid; otherwise, false.</returns>
</member>
<member name="M:DXHook.Hook.SafeHGlobal.#ctor(System.Int32)">
<summary>
Initializes a new instance of the <see cref="T:DXHook.Hook.SafeHGlobal"/> class.
</summary>
<param name="sizeInBytes">The size of the block of memory to allocate, in bytes.</param>
</member>
<member name="M:DXHook.Hook.SafeHGlobal.ReleaseHandle">
<summary>
When overridden in a derived class, executes the code required to free the handle.
</summary>
<returns>
true if the handle is released successfully; otherwise, in the event of a catastrophic failure, false. In this case, it generates a releaseHandleFailed MDA Managed Debugging Assistant.
</returns>
</member>
<member name="M:DXHook.Hook.TextDisplay.Frame">
<summary>
Must be called each frame
</summary>
</member>
<member name="P:DXHook.Interface.CaptureInterface.ProcessId">
<summary>
The client process Id
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.RemoteMessage">
<summary>
Server event for sending debug and error information from the client to server
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.ScreenshotReceived">
<summary>
Server event for receiving screenshot image data
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.RecordingStarted">
<summary>
Client event used to communicate to the client that it is time to start recording
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.RecordingStopped">
<summary>
Client event used to communicate to the client that it is time to stop recording
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.ScreenshotRequested">
<summary>
Client event used to communicate to the client that it is time to create a screenshot
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.Disconnected">
<summary>
Client event used to notify the hook to exit
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.DisplayText">
<summary>
Client event used to display a piece of text in-game
</summary>
</member>
<member name="E:DXHook.Interface.CaptureInterface.DrawOverlay">
<summary>
Client event used to (re-)draw an overlay in-game.
</summary>
</member>
<member name="M:DXHook.Interface.CaptureInterface.StartRecording(DXHook.Interface.CaptureConfig)">
<summary>
If not <see cref="P:DXHook.Interface.CaptureInterface.IsRecording"/> will invoke the <see cref="E:DXHook.Interface.CaptureInterface.RecordingStarted"/> event, starting a new recording.
</summary>
<param name="config">The configuration for the recording</param>
<remarks>Handlers in the server and remote process will be be invoked.</remarks>
</member>
<member name="M:DXHook.Interface.CaptureInterface.StopRecording">
<summary>
If <see cref="P:DXHook.Interface.CaptureInterface.IsRecording"/>, will invoke the <see cref="E:DXHook.Interface.CaptureInterface.RecordingStopped"/> event, finalising any existing recording.
</summary>
<remarks>Handlers in the server and remote process will be be invoked.</remarks>
</member>
<member name="M:DXHook.Interface.CaptureInterface.GetScreenshot">
<summary>
Get a fullscreen screenshot with the default timeout of 2 seconds
</summary>
</member>
<member name="M:DXHook.Interface.CaptureInterface.GetScreenshot(System.Drawing.Rectangle,System.TimeSpan,System.Nullable{System.Drawing.Size},DXHook.Interface.ImageFormat)">
<summary>
Get a screenshot of the specified region
</summary>
<param name="region">the region to capture (x=0,y=0 is top left corner)</param>
<param name="timeout">maximum time to wait for the screenshot</param>
</member>
<member name="M:DXHook.Interface.CaptureInterface.Disconnect">
<summary>
Tell the client process to disconnect
</summary>
</member>
<member name="M:DXHook.Interface.CaptureInterface.Message(DXHook.Interface.MessageType,System.String,System.Object[])">
<summary>
Send a message to all handlers of <see cref="E:DXHook.Interface.CaptureInterface.RemoteMessage"/>.
</summary>
<param name="messageType"></param>
<param name="format"></param>
<param name="args"></param>
</member>
<member name="M:DXHook.Interface.CaptureInterface.DisplayInGameText(System.String)">
<summary>
Display text in-game for the default duration of 5 seconds
</summary>
<param name="text"></param>
</member>
<member name="M:DXHook.Interface.CaptureInterface.DisplayInGameText(System.String,System.TimeSpan)">
<summary>
</summary>
<param name="text"></param>
<param name="duration"></param>
</member>
<member name="M:DXHook.Interface.CaptureInterface.DrawOverlayInGame(DXHook.Hook.Common.IOverlay)">
<summary>
Replace the in-game overlay with the one provided.
Note: this is not designed for fast updates (i.e. only a couple of times per second)
</summary>
<param name="overlay"></param>
</member>
<member name="M:DXHook.Interface.CaptureInterface.Ping">
<summary>
Used to confirm connection to IPC server channel
</summary>
</member>
<member name="T:DXHook.Interface.ClientCaptureInterfaceEventProxy">
<summary>
Client event proxy for marshalling event handlers
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.RecordingStarted">
<summary>
Client event used to communicate to the client that it is time to start recording
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.RecordingStopped">
<summary>
Client event used to communicate to the client that it is time to stop recording
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.ScreenshotRequested">
<summary>
Client event used to communicate to the client that it is time to create a screenshot
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.Disconnected">
<summary>
Client event used to notify the hook to exit
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.DisplayText">
<summary>
Client event used to display in-game text
</summary>
</member>
<member name="E:DXHook.Interface.ClientCaptureInterfaceEventProxy.DrawOverlay">
<summary>
Client event used to (re-)draw an overlay in-game.
</summary>
</member>
<member name="T:DXHook.Interface.DrawOverlayEventArgs">
<summary>
Note: Deliberately not using MarshalByRefObj
</summary>
</member>
<member name="M:DXHook.Interface.Screenshot.Disconnect">
<summary>
Disconnects the remoting channel(s) of this object and all nested objects.
</summary>
</member>
<member name="M:DXHook.Interface.ScreenshotRequest.Disconnect">
<summary>
Disconnects the remoting channel(s) of this object and all nested objects.
</summary>
</member>
<member name="M:DXHook.NativeMethods.ShowWindow(System.IntPtr,DXHook.NativeMethods.WindowShowStyle)">
<summary>Shows a Window</summary>
<remarks>
<para>To perform certain special effects when showing or hiding a
window, use AnimateWindow.</para>
<para>The first time an application calls ShowWindow, it should use
the WinMain function's nCmdShow parameter as its nCmdShow parameter.
Subsequent calls to ShowWindow must use one of the values in the
given list, instead of the one specified by the WinMain function's
nCmdShow parameter.</para>
<para>As noted in the discussion of the nCmdShow parameter, the
nCmdShow value is ignored in the first call to ShowWindow if the
program that launched the application specifies startup information
in the structure. In this case, ShowWindow uses the information
specified in the STARTUPINFO structure to show the window. On
subsequent calls, the application must call ShowWindow with nCmdShow
set to SW_SHOWDEFAULT to use the startup information provided by the
program that launched the application. This behavior is designed for
the following situations: </para>
<list type="">
<item>Applications create their main window by calling CreateWindow
with the WS_VISIBLE flag set. </item>
<item>Applications create their main window by calling CreateWindow
with the WS_VISIBLE flag cleared, and later call ShowWindow with the
SW_SHOW flag set to make it visible.</item>
</list></remarks>
<param name="hWnd">Handle to the window.</param>
<param name="nCmdShow">Specifies how the window is to be shown.
This parameter is ignored the first time an application calls
ShowWindow, if the program that launched the application provides a
STARTUPINFO structure. Otherwise, the first time ShowWindow is called,
the value should be the value obtained by the WinMain function in its
nCmdShow parameter. In subsequent calls, this parameter can be one of
the WindowShowStyle members.</param>
<returns>
If the window was previously visible, the return value is nonzero.
If the window was previously hidden, the return value is zero.
</returns>
</member>
<member name="T:DXHook.NativeMethods.WindowShowStyle">
<summary>Enumeration of the different ways of showing a window using
ShowWindow</summary>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.Hide">
<summary>Hides the window and activates another window.</summary>
<remarks>See SW_HIDE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNormal">
<summary>Activates and displays a window. If the window is minimized
or maximized, the system restores it to its original size and
position. An application should specify this flag when displaying
the window for the first time.</summary>
<remarks>See SW_SHOWNORMAL</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMinimized">
<summary>Activates the window and displays it as a minimized window.</summary>
<remarks>See SW_SHOWMINIMIZED</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMaximized">
<summary>Activates the window and displays it as a maximized window.</summary>
<remarks>See SW_SHOWMAXIMIZED</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.Maximize">
<summary>Maximizes the specified window.</summary>
<remarks>See SW_MAXIMIZE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNormalNoActivate">
<summary>Displays a window in its most recent size and position.
This value is similar to "ShowNormal", except the window is not
actived.</summary>
<remarks>See SW_SHOWNOACTIVATE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.Show">
<summary>Activates the window and displays it in its current size
and position.</summary>
<remarks>See SW_SHOW</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.Minimize">
<summary>Minimizes the specified window and activates the next
top-level window in the Z order.</summary>
<remarks>See SW_MINIMIZE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowMinNoActivate">
<summary>Displays the window as a minimized window. This value is
similar to "ShowMinimized", except the window is not activated.</summary>
<remarks>See SW_SHOWMINNOACTIVE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowNoActivate">
<summary>Displays the window in its current size and position. This
value is similar to "Show", except the window is not activated.</summary>
<remarks>See SW_SHOWNA</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.Restore">
<summary>Activates and displays the window. If the window is
minimized or maximized, the system restores it to its original size
and position. An application should specify this flag when restoring
a minimized window.</summary>
<remarks>See SW_RESTORE</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ShowDefault">
<summary>Sets the show state based on the SW_ value specified in the
STARTUPINFO structure passed to the CreateProcess function by the
program that started the application.</summary>
<remarks>See SW_SHOWDEFAULT</remarks>
</member>
<member name="F:DXHook.NativeMethods.WindowShowStyle.ForceMinimized">
<summary>Windows 2000/XP: Minimizes a window, even if the thread
that owns the window is hung. This flag should only be used when
minimizing windows from a different thread.</summary>
<remarks>See SW_FORCEMINIMIZE</remarks>
</member>
<member name="M:DXHook.NativeMethods.GetForegroundWindow">
<summary>
The GetForegroundWindow function returns a handle to the foreground window.
</summary>
</member>
<member name="T:SharpDX.Component">
<summary>
A disposable component base class.
</summary>
</member>
<member name="P:SharpDX.Component.DisposeCollector">
<summary>
Gets or sets the disposables.
</summary>
<value>The disposables.</value>
</member>
<member name="M:SharpDX.Component.#ctor">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Component"/> class.
</summary>
</member>
<member name="M:SharpDX.Component.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Component" /> class with an immutable name.
</summary>
<param name="name">The name.</param>
</member>
<member name="P:SharpDX.Component.IsAttached">
<summary>
Gets or sets a value indicating whether this instance is attached to a collector.
</summary>
<value>
<c>true</c> if this instance is attached to a collector; otherwise, <c>false</c>.
</value>
</member>
<member name="P:SharpDX.Component.IsDisposed">
<summary>
Gets a value indicating whether this instance is disposed.
</summary>
<value>
<c>true</c> if this instance is disposed; otherwise, <c>false</c>.
</value>
</member>
<member name="E:SharpDX.Component.Disposing">
<summary>
Occurs when when Dispose is called.
</summary>
</member>
<member name="M:SharpDX.Component.Dispose">
<summary>
Releases unmanaged and - optionally - managed resources
</summary>
</member>
<member name="M:SharpDX.Component.Dispose(System.Boolean)">
<summary>
Disposes of object resources.
</summary>
<param name="disposeManagedResources">If true, managed resources should be
disposed of in addition to unmanaged resources.</param>
</member>
<member name="M:SharpDX.Component.ToDispose``1(``0)">
<summary>
Adds a disposable object to the list of the objects to dispose.
</summary>
<param name="toDisposeArg">To dispose.</param>
</member>
<member name="M:SharpDX.Component.RemoveAndDispose``1(``0@)">
<summary>
Dispose a disposable object and set the reference to null. Removes this object from the ToDispose list.
</summary>
<param name="objectToDispose">Object to dispose.</param>
</member>
<member name="M:SharpDX.Component.RemoveToDispose``1(``0)">
<summary>
Removes a disposable object to the list of the objects to dispose.
</summary>
<typeparam name="T"></typeparam>
<param name="toDisposeArg">To dispose.</param>
</member>
<member name="T:SharpDX.ComponentBase">
<summary>
A lightweight Component base class.
</summary>
</member>
<member name="F:SharpDX.ComponentBase.name">
<summary>
Occurs while this component is disposing and before it is disposed.
</summary>
</member>
<member name="F:SharpDX.ComponentBase.isNameImmutable">
<summary>
Gets or sets a value indicating whether the name of this instance is immutable.
</summary>
<value><c>true</c> if this instance is name immutable; otherwise, <c>false</c>.</value>
</member>
<member name="M:SharpDX.ComponentBase.#ctor">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.ComponentBase" /> class with a mutable name.
</summary>
</member>
<member name="M:SharpDX.ComponentBase.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.ComponentBase" /> class with an immutable name.
</summary>
<param name="name">The name.</param>
</member>
<member name="P:SharpDX.ComponentBase.Name">
<summary>
Gets the name of this component.
</summary>
<value>The name.</value>
</member>
<member name="P:SharpDX.ComponentBase.Tag">
<summary>
Gets or sets the tag associated to this object.
</summary>
<value>The tag.</value>
</member>
<member name="E:SharpDX.ComponentBase.PropertyChanged">
<summary>
Occurs when a property value changes.
</summary>
</member>
<member name="T:SharpDX.IComponent">
<summary>
Base interface for a component base.
</summary>
</member>
<member name="P:SharpDX.IComponent.Name">
<summary>
Gets the name of this component.
</summary>
<value>The name.</value>
</member>
</members>
</doc>

BIN
libs/DXHook/EasyHook.dll Normal file

Binary file not shown.

2146
libs/DXHook/EasyHook.xml Normal file

File diff suppressed because it is too large Load Diff

BIN
libs/DXHook/EasyHook32.dll Normal file

Binary file not shown.

Binary file not shown.

BIN
libs/DXHook/EasyHook64.dll Normal file

Binary file not shown.

Binary file not shown.

BIN
libs/DXHook/EasyLoad32.dll Normal file

Binary file not shown.

BIN
libs/DXHook/EasyLoad64.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

8737
libs/DXHook/SharpDX.DXGI.xml Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,469 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>SharpDX.Desktop</name>
</assembly>
<members>
<member name="T:SharpDX.Diagnostics.VSGraphicsDebugger">
<summary>
Helper class to allow programmatic capturing of graphics information that can be loaded later in Visual Studio.
This is a managed implementation of the VsDbg class (http://msdn.microsoft.com/en-us/library/vstudio/dn440549.aspx).
Requires to have installed VS Remote Tools.
http://msdn.microsoft.com/en-us/library/vstudio/hh708963.aspx
http://msdn.microsoft.com/en-us/library/vstudio/hh780905.aspx
</summary>
</member>
<member name="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken">
<summary>
Helper structure to ease the begin/end graphics capturing
</summary>
<example>
var debugger = new VSGraphicsDebugger();
using(debugger.BeginCapture())
{
...
}
</example>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken.#ctor(SharpDX.Diagnostics.VSGraphicsDebugger)">
<summary>
Creates a new instance of the <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken"/> structure.
</summary>
<param name="debugger">The attanched graphics debugger.</param>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken.Dispose">
<summary>
Ends the capture by calling <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/>.
</summary>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.#ctor(System.String)">
<summary>
Creates a new instance of the <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger"/> class and prepares the in-app component of graphics diagnostics to actively capture and record graphics information..
</summary>
<param name="logFileName">The destination filename for log writing.</param>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CopyLogFile(System.String)">
<summary>
Copies the contents of the active graphics log (.vsglog) file into a new file.
</summary>
<param name="destinationFileName">The new log file name.</param>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.ToggleHUD">
<summary>
Toggles the graphics diagnostics HUD overlay on or off.
</summary>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.AddHUDMessage(System.String)">
<summary>
Adds a custom message to the graphics diagnostics HUD (Head-Up Display).
</summary>
<param name="message">The message to add.</param>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureCurrentFrame">
<summary>
Captures the remainder of the current frame to the graphics log file.
</summary>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.BeginCapture">
<summary>
Begins a capture interval that will end with <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/>.
</summary>
<returns>A <see cref="T:SharpDX.Diagnostics.VSGraphicsDebugger.CaptureToken"/> instance that once disposed, calls automatically the <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture"/> method.</returns>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.EndCapture">
<summary>
Ends a capture interval that was started with <see cref="M:SharpDX.Diagnostics.VSGraphicsDebugger.BeginCapture"/>.
</summary>
</member>
<member name="M:SharpDX.Diagnostics.VSGraphicsDebugger.Dispose(System.Boolean)">
<summary>
Finalizes the graphics log file, closes it, and frees resources that were used while the app was actively recording graphics information.
</summary>
<param name="disposing">Ignored.</param>
</member>
<member name="T:SharpDX.Direct3D.PixHelper">
<summary>
Helper class for PIX.
</summary>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.BeginEvent(SharpDX.Mathematics.Interop.RawColorBGRA,System.String)">
<summary>
Marks the beginning of a user-defined event. PIX can use this event to trigger an action.
</summary>
<param name="color">The Event color.</param>
<param name="name">The Event Name.</param>
<returns>The zero-based level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.</returns>
<unmanaged>D3DPERF_BeginEvent</unmanaged>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.BeginEvent(SharpDX.Mathematics.Interop.RawColorBGRA,System.String,System.Object[])">
<summary>
Marks the beginning of a user-defined event. PIX can use this event to trigger an action.
</summary>
<param name="color">The Event color.</param>
<param name="name">The Event formatted Name.</param>
<param name="parameters">The parameters to use for the formatted name.</param>
<returns>
The zero-based level of the hierarchy that this event is starting in. If an error occurs, the return value will be negative.
</returns>
<unmanaged>D3DPERF_BeginEvent</unmanaged>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.EndEvent">
<summary>
Mark the end of a user-defined event. PIX can use this event to trigger an action.
</summary>
<returns>The level of the hierarchy in which the event is ending. If an error occurs, this value is negative.</returns>
<unmanaged>D3DPERF_EndEvent</unmanaged>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.SetMarker(SharpDX.Mathematics.Interop.RawColorBGRA,System.String)">
<summary>
Mark an instantaneous event. PIX can use this event to trigger an action.
</summary>
<param name="color">The color.</param>
<param name="name">The name.</param>
<unmanaged>D3DPERF_SetMarker</unmanaged>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.SetMarker(SharpDX.Mathematics.Interop.RawColorBGRA,System.String,System.Object[])">
<summary>
Mark an instantaneous event. PIX can use this event to trigger an action.
</summary>
<param name="color">The color.</param>
<param name="name">The name to format.</param>
<param name="parameters">The parameters to use to format the name.</param>
<unmanaged>D3DPERF_SetMarker</unmanaged>
</member>
<member name="M:SharpDX.Direct3D.PixHelper.AllowProfiling(System.Boolean)">
<summary>
Set this to false to notify PIX that the target program does not give permission to be profiled.
</summary>
<param name="enableFlag">if set to <c>true</c> PIX profiling is authorized. Default to true.</param>
<unmanaged>D3DPERF_SetOptions</unmanaged>
</member>
<member name="P:SharpDX.Direct3D.PixHelper.IsCurrentlyProfiled">
<summary>
Gets a value indicating whether this instance is currently profiled by PIX.
</summary>
<value>
<c>true</c> if this instance is currently profiled; otherwise, <c>false</c>.
</value>
<unmanaged>D3DPERF_GetStatus</unmanaged>
</member>
<member name="T:SharpDX.MessageFilterHook">
<summary>
Provides a hook to WndProc of an existing window handle using <see cref="T:System.Windows.Forms.IMessageFilter"/>.
</summary>
</member>
<member name="M:SharpDX.MessageFilterHook.#ctor(System.IntPtr)">
<summary>
Initializes a new instance of the <see cref="!:Win32.MessageFilterHook" /> class.
</summary>
<param name="hwnd">The HWND.</param>
</member>
<member name="M:SharpDX.MessageFilterHook.AddMessageFilter(System.IntPtr,System.Windows.Forms.IMessageFilter)">
<summary>
Adds a message filter to a window.
</summary>
<param name="hwnd">The handle of the window.</param>
<param name="messageFilter">The message filter.</param>
</member>
<member name="M:SharpDX.MessageFilterHook.RemoveMessageFilter(System.IntPtr,System.Windows.Forms.IMessageFilter)">
<summary>
Removes a message filter associated with a window.
</summary>
<param name="hwnd">The handle of the window.</param>
<param name="messageFilter">The message filter.</param>
</member>
<member name="T:SharpDX.Desktop.Properties.Resources">
<summary>
A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member>
<member name="P:SharpDX.Desktop.Properties.Resources.ResourceManager">
<summary>
Returns the cached ResourceManager instance used by this class.
</summary>
</member>
<member name="P:SharpDX.Desktop.Properties.Resources.Culture">
<summary>
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
</summary>
</member>
<member name="P:SharpDX.Desktop.Properties.Resources.logo">
<summary>
Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
</summary>
</member>
<member name="T:SharpDX.Windows.RenderControl">
<summary>
A Renderable UserControl.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderControl.#ctor">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderControl.OnPaintBackground(System.Windows.Forms.PaintEventArgs)">
<summary>
Paints the background of the control.
</summary>
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderControl.OnPaint(System.Windows.Forms.PaintEventArgs)">
<summary>
Raises the <see cref="E:System.Windows.Forms.Control.Paint"/> event.
</summary>
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
</member>
<member name="T:SharpDX.Windows.RenderForm">
<summary>
Default Rendering Form.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderForm.#ctor">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderForm.#ctor(System.String)">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderForm"/> class.
</summary>
<param name="text">The text.</param>
</member>
<member name="E:SharpDX.Windows.RenderForm.AppActivated">
<summary>
Occurs when [app activated].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.AppDeactivated">
<summary>
Occurs when [app deactivated].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.MonitorChanged">
<summary>
Occurs when [monitor changed].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.PauseRendering">
<summary>
Occurs when [pause rendering].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.ResumeRendering">
<summary>
Occurs when [resume rendering].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.Screensaver">
<summary>
Occurs when [screensaver].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.SystemResume">
<summary>
Occurs when [system resume].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.SystemSuspend">
<summary>
Occurs when [system suspend].
</summary>
</member>
<member name="E:SharpDX.Windows.RenderForm.UserResized">
<summary>
Occurs when [user resized].
</summary>
</member>
<member name="P:SharpDX.Windows.RenderForm.AllowUserResizing">
<summary>
Gets or sets a value indicating whether this form can be resized by the user. See remarks.
</summary>
<remarks>
This property alters <see cref="P:System.Windows.Forms.Form.FormBorderStyle"/>,
for <c>true</c> value it is <see cref="F:System.Windows.Forms.FormBorderStyle.Sizable"/>,
for <c>false</c> - <see cref="F:System.Windows.Forms.FormBorderStyle.FixedSingle"/>.
</remarks>
<value><c>true</c> if this form can be resized by the user (by default); otherwise, <c>false</c>.</value>
</member>
<member name="P:SharpDX.Windows.RenderForm.IsFullscreen">
<summary>
Gets or sets a value indicationg whether the current render form is in fullscreen mode. See remarks.
</summary>
<remarks>
If Toolkit is used, this property is set automatically,
otherwise user should maintain it himself as it affects the behavior of <see cref="P:SharpDX.Windows.RenderForm.AllowUserResizing"/> property.
</remarks>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnResizeBegin(System.EventArgs)">
<summary>
Raises the <see cref="E:System.Windows.Forms.Form.ResizeBegin"/> event.
</summary>
<param name="e">A <see cref="T:System.EventArgs"/> that contains the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnResizeEnd(System.EventArgs)">
<summary>
Raises the <see cref="E:System.Windows.Forms.Form.ResizeEnd"/> event.
</summary>
<param name="e">A <see cref="T:System.EventArgs"/> that contains the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnLoad(System.EventArgs)">
<summary>
Raises the <see cref="E:System.Windows.Forms.Form.Load"/> event.
</summary>
<param name="e">An <see cref="T:System.EventArgs"/> that contains the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnPaintBackground(System.Windows.Forms.PaintEventArgs)">
<summary>
Paints the background of the control.
</summary>
<param name="e">A <see cref="T:System.Windows.Forms.PaintEventArgs"/> that contains the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnPauseRendering(System.EventArgs)">
<summary>
Raises the Pause Rendering event.
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnResumeRendering(System.EventArgs)">
<summary>
Raises the Resume Rendering event.
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnUserResized(System.EventArgs)">
<summary>
Raises the User resized event.
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnAppActivated(System.EventArgs)">
<summary>
Raises the On App Activated event.
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnAppDeactivated(System.EventArgs)">
<summary>
Raises the App Deactivated event
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnSystemSuspend(System.EventArgs)">
<summary>
Raises the System Suspend event
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnSystemResume(System.EventArgs)">
<summary>
Raises the System Resume event
</summary>
<param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.OnScreensaver(System.ComponentModel.CancelEventArgs)">
<summary>
Raises the <see cref="E:Screensaver"/> event.
</summary>
<param name="e">The <see cref="T:System.ComponentModel.CancelEventArgs"/> instance containing the event data.</param>
</member>
<member name="M:SharpDX.Windows.RenderForm.WndProc(System.Windows.Forms.Message@)">
<summary>
Override windows message loop handling.
</summary>
<param name="m">The Windows <see cref="T:System.Windows.Forms.Message"/> to process.</param>
</member>
<member name="T:SharpDX.Windows.RenderLoop">
<summary>
RenderLoop provides a rendering loop infrastructure. See remarks for usage.
</summary>
<remarks>
Use static <see cref="!:Run(System.Windows.Forms.Control,SharpDX.Windows.RenderLoop.RenderCallback)"/>
method to directly use a renderloop with a render callback or use your own loop:
<code>
control.Show();
using (var loop = new RenderLoop(control))
{
while (loop.NextFrame())
{
// Perform draw operations here.
}
}
</code>
Note that the main control can be changed at anytime inside the loop.
</remarks>
</member>
<member name="M:SharpDX.Windows.RenderLoop.#ctor">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderLoop"/> class.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderLoop.#ctor(System.Windows.Forms.Control)">
<summary>
Initializes a new instance of the <see cref="T:SharpDX.Windows.RenderLoop"/> class.
</summary>
</member>
<member name="P:SharpDX.Windows.RenderLoop.Control">
<summary>
Gets or sets the control to associate with the current render loop.
</summary>
<value>The control.</value>
<exception cref="T:System.InvalidOperationException">Control is already disposed</exception>
</member>
<member name="P:SharpDX.Windows.RenderLoop.UseApplicationDoEvents">
<summary>
Gets or sets a value indicating whether the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop lightweight for GC. Default is false.
</summary>
<value><c>true</c> if the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop (default false); otherwise, <c>false</c>.</value>
<remarks>By default, RenderLoop is using a custom window message loop that is more lightweight than <see cref="M:System.Windows.Forms.Application.DoEvents" /> to process windows event message.
Set this parameter to true to use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/>.</remarks>
</member>
<member name="M:SharpDX.Windows.RenderLoop.NextFrame">
<summary>
Calls this method on each frame.
</summary>
<returns><c>true</c> if if the control is still active, <c>false</c> otherwise.</returns>
<exception cref="T:System.InvalidOperationException">An error occured </exception>
</member>
<member name="M:SharpDX.Windows.RenderLoop.Dispose">
<summary>
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
</summary>
</member>
<member name="T:SharpDX.Windows.RenderLoop.RenderCallback">
<summary>
Delegate for the rendering loop.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderLoop.Run(System.Windows.Forms.ApplicationContext,SharpDX.Windows.RenderLoop.RenderCallback)">
<summary>
Runs the specified main loop in the specified context.
</summary>
</member>
<member name="M:SharpDX.Windows.RenderLoop.Run(System.Windows.Forms.Control,SharpDX.Windows.RenderLoop.RenderCallback,System.Boolean)">
<summary>
Runs the specified main loop for the specified windows form.
</summary>
<param name="form">The form.</param>
<param name="renderCallback">The rendering callback.</param>
<param name="useApplicationDoEvents">if set to <c>true</c> indicating whether the render loop should use the default <see cref="M:System.Windows.Forms.Application.DoEvents"/> instead of a custom window message loop lightweight for GC. Default is false.</param>
<exception cref="T:System.ArgumentNullException">form
or
renderCallback</exception>
</member>
<member name="P:SharpDX.Windows.RenderLoop.IsIdle">
<summary>
Gets a value indicating whether this instance is application idle.
</summary>
<value>
<c>true</c> if this instance is application idle; otherwise, <c>false</c>.
</value>
</member>
<member name="T:SharpDX.Win32Native">
<summary>
Internal class to interact with Native Message
</summary>
</member>
</members>
</doc>

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

BIN
libs/DXHook/SharpDX.dll Normal file

Binary file not shown.

BIN
libs/DXHook/SharpDX.pdb Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

5
publish-server.cmd Normal file
View File

@ -0,0 +1,5 @@
dotnet publish Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r win-x64 -o bin/Release/Server/win-x64 -c Release
dotnet publish Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r win-x86 -o bin/Release/Server/win-x86 -c Release
dotnet publish Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r linux-x64 -o bin/Release/Server/linux-x64 -c Release
dotnet publish Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r linux-arm -o bin/Release/Server/linux-arm -c Release
dotnet publish Server/RageCoop.Server.csproj --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=false -r linux-arm64 -o bin/Release/Server/linux-arm64 -c Release