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

67
Native/Inject/RootLayer.h Normal file
View file

@ -0,0 +1,67 @@
// RootLayer.h : Declaration of the cRootLayer
#ifndef __ROOTLAYER_H_
#define __ROOTLAYER_H_
#include "resource.h" // main symbols
// This special layer implements no sinks, it is merely a container
// layer for the bar manager and the window manager - it server no other purpose
// than to forward event on and avoid redundant looping in the manager object.
#include "SinkImpl.h"
class cView;
/////////////////////////////////////////////////////////////////////////////
// cRootLayer
class ATL_NO_VTABLE cRootLayer :
public CComObjectRootEx<CComMultiThreadModel>,
public ILayerImpl< cRootLayer >,
public IPanelSink,
public cNoEventsImpl,
public IRootLayer
{
public:
cRootLayer() : m_nNextViewID( 1000 ), m_nViewMode( 0 )
{
RegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
if( key.QueryDWORDValue( _T("ViewMode"), m_nViewMode ) != ERROR_SUCCESS)
m_nViewMode = 0;
}
DWORD m_nViewMode;
CComPtr< IBarManager > m_pBars;
CComPtr< IPanel > m_pPanel;
typedef std::list< cView * > cViewList;
cViewList m_views;
long m_nNextViewID;
long m_lDefaultX;
long m_lDefaultY;
void addView( cView *pView, ILayer *pRootLayer );
void removeView( cView *pView );
void onCreate();
void onDestroy();
BEGIN_COM_MAP(cRootLayer)
COM_INTERFACE_ENTRY(IPanelSink)
COM_INTERFACE_ENTRY(IRootLayer)
COM_INTERFACE_ENTRY(ILayer)
END_COM_MAP()
public:
// IRootLayer Methods
STDMETHOD(CreateView)(ViewParams *pParams, ILayer *pLayer, /*[out, retval]*/ IView **ppView);
STDMETHOD(SelectBar)(long nID);
STDMETHOD(LoadView)(BSTR strXML, /*[out, retval]*/ IView **ppView);
STDMETHOD(LoadViewObject)(IUnknown *pSchema, /*[out, retval]*/ IView **ppView);
// IPanelSink Methods
STDMETHOD(PanelDeactivate)( long nViewID );
};
#endif //__ROOTLAYER_H_