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:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
84
Managed/Decal.Adapter/Decal.Adapter.Wrappers/DecalWrapper.cs
Normal file
84
Managed/Decal.Adapter/Decal.Adapter.Wrappers/DecalWrapper.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using Decal.Adapter.Support;
|
||||
using Decal.Interop.Core;
|
||||
|
||||
namespace Decal.Adapter.Wrappers;
|
||||
|
||||
[CLSCompliant(true)]
|
||||
public class DecalWrapper : MarshalByRefObject, IDisposable
|
||||
{
|
||||
internal static Guid IID_IDISPATCH = new Guid("{00020400-0000-0000-C000-000000000046}");
|
||||
|
||||
internal static Guid IID_IUNKNOWN = new Guid("{00000000-0000-0000-C000-000000000046}");
|
||||
|
||||
private DecalCore myDecal;
|
||||
|
||||
private bool isDisposed;
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public DecalCore Underlying => myDecal;
|
||||
|
||||
public IntPtr Hwnd => new IntPtr(myDecal.HWND);
|
||||
|
||||
public bool Focus => myDecal.Focus;
|
||||
|
||||
internal DecalWrapper(DecalCore decal)
|
||||
{
|
||||
myDecal = decal;
|
||||
}
|
||||
|
||||
~DecalWrapper()
|
||||
{
|
||||
Dispose(disposing: false);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (!isDisposed)
|
||||
{
|
||||
}
|
||||
if (myDecal != null)
|
||||
{
|
||||
Marshal.ReleaseComObject(myDecal);
|
||||
myDecal = null;
|
||||
}
|
||||
isDisposed = true;
|
||||
}
|
||||
|
||||
public object GetObject(string path)
|
||||
{
|
||||
return GetObject(path, IID_IDISPATCH);
|
||||
}
|
||||
|
||||
public object GetObject(string path, string iid)
|
||||
{
|
||||
return GetObject(path, new Guid(iid));
|
||||
}
|
||||
|
||||
public object GetObject(string path, Guid iid)
|
||||
{
|
||||
try
|
||||
{
|
||||
return ((dynamic)(IDecalCore)myDecal).get_Object(path, ref iid);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Util.WriteLine("Exception for {0} during get_Object: {1}", path, ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public string MapPath(string path)
|
||||
{
|
||||
return myDecal.MapPath(path);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue