Initial commit: Complete open-source Decal rebuild

All 5 phases of the open-source Decal rebuild:

Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil)
Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs
  - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters
  - Decal.Core, DecalControls, DecalRender, D3DService
Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL
Phase 4: DenAgent WinForms tray application
Phase 5: WiX installer and build script

25 C# projects building with 0 errors.
Native C++ projects require VS 2022 + Windows SDK (x86).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
erik 2026-02-08 18:27:56 +01:00
commit d1442e3747
1382 changed files with 170725 additions and 0 deletions

View file

@ -0,0 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Decal.Interop.Dat</AssemblyName>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,10 @@
using System.Runtime.InteropServices;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("4EC04AB5-F87A-465D-B282-1B6C2E6068C9")]
[CoClass(typeof(DatLibraryClass))]
public interface DatLibrary : IDatLibrary
{
}

View file

@ -0,0 +1,26 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("6FA05FDA-B4B5-4386-AB45-92D7E6A5D698")]
[SuppressUnmanagedCodeSecurity]
[ClassInterface(ClassInterfaceType.None)]
public class DatLibraryClass : IDatLibrary, DatLibrary
{
[DispId(1)]
public virtual extern object Stream
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.IUnknown)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.IUnknown)]
public virtual extern object Open([MarshalAs(UnmanagedType.BStr)] string Protocol, uint File);
}

View file

@ -0,0 +1,10 @@
using System.Runtime.InteropServices;
namespace Decal.Interop.Dat;
[ComImport]
[CoClass(typeof(DatServiceClass))]
[Guid("D501DE12-DD81-4CE1-8854-78CBCB96C2DB")]
public interface DatService : IDatService
{
}

View file

@ -0,0 +1,13 @@
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[ClassInterface(ClassInterfaceType.None)]
[Guid("37B083F0-276E-43AD-8D26-3F7449B519DC")]
[TypeLibType(2)]
[SuppressUnmanagedCodeSecurity]
public class DatServiceClass : IDatService, DatService
{
}

View file

@ -0,0 +1,10 @@
using System.Runtime.InteropServices;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("B27D3F72-2640-432F-BAE4-175E1AA0CA39")]
[CoClass(typeof(DatStreamClass))]
public interface DatStream : IDatStream
{
}

View file

@ -0,0 +1,39 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[SuppressUnmanagedCodeSecurity]
[ClassInterface(ClassInterfaceType.None)]
[Guid("9F7F6CD9-D164-418D-8CB5-3B9ACD70BEAF")]
public class DatStreamClass : IDatStream, DatStream
{
[DispId(1610678272)]
public virtual extern int Size
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
[DispId(1610678273)]
public virtual extern int Tell
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Skip(int Bytes);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void Restart();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void ReadBinary(int Bytes, ref byte Buffer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.BStr)]
public virtual extern string Read(int Bytes);
}

View file

@ -0,0 +1,26 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("4EC04AB5-F87A-465D-B282-1B6C2E6068C9")]
[TypeLibType(4160)]
[SuppressUnmanagedCodeSecurity]
public interface IDatLibrary
{
[DispId(1)]
object Stream
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
[return: MarshalAs(UnmanagedType.IUnknown)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
[return: MarshalAs(UnmanagedType.IUnknown)]
object Open([MarshalAs(UnmanagedType.BStr)] string Protocol, uint File);
}

View file

@ -0,0 +1,12 @@
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("D501DE12-DD81-4CE1-8854-78CBCB96C2DB")]
[TypeLibType(4160)]
[SuppressUnmanagedCodeSecurity]
public interface IDatService
{
}

View file

@ -0,0 +1,39 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("B27D3F72-2640-432F-BAE4-175E1AA0CA39")]
[SuppressUnmanagedCodeSecurity]
[InterfaceType(1)]
public interface IDatStream
{
[DispId(1610678272)]
int Size
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
[DispId(1610678273)]
int Tell
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Skip(int Bytes);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Restart();
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void ReadBinary(int Bytes, ref byte Buffer);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.BStr)]
string Read(int Bytes);
}

View file

@ -0,0 +1,15 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace Decal.Interop.Dat;
[ComImport]
[Guid("1349EF1A-06EA-43E5-9026-4F3967C6C1D3")]
[SuppressUnmanagedCodeSecurity]
[InterfaceType(1)]
public interface IFileFilter
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
void Initialize([MarshalAs(UnmanagedType.Interface)] DatStream Stream);
}

View file

@ -0,0 +1,10 @@
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security;
[assembly: ImportedFromTypeLib("DecalDat")]
[assembly: Guid("c2c11ec7-2cb9-4999-bdd9-af599455601f")]
[assembly: TypeLibVersion(2, 0)]
[assembly: PrimaryInteropAssembly(2, 0)]
[assembly: SecurityRules(SecurityRuleSet.Level2)]
[assembly: AssemblyVersion("2.9.8.3")]