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

76
Native/Decal/DecalEnum.h Normal file
View file

@ -0,0 +1,76 @@
// DecalEnum.h : Declaration of the cDecalEnum
#ifndef __DECALENUM_H_
#define __DECALENUM_H_
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// cDecalEnum
class ATL_NO_VTABLE cDecalEnum :
public CComObjectRootEx<CComMultiThreadModel>,
public CComCoClass<cDecalEnum, &CLSID_DecalEnum>,
public IDecalEnum
{
public:
cDecalEnum()
: m_nIndex( -1 )
{
}
~cDecalEnum();
DECLARE_REGISTRY_RESOURCEID(IDR_DECALENUM)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(cDecalEnum)
COM_INTERFACE_ENTRY(IDecalEnum)
END_COM_MAP()
bool Initialize( IDecal *pDecal, BSTR strKey );
// Skip to a single key - next will terminate iteration
HRESULT Advance( REFCLSID clsid );
// Load an ordered list of keys
HRESULT Begin();
struct cKeyEntry
{
CLSID m_clsid;
TCHAR m_letter;
};
void insertKey ( cKeyEntry &ke, TCHAR *szOrder, TCHAR *szEndOrder );
HRESULT openKeyAt ( int nIndex );
typedef std::vector< cKeyEntry > cKeyList;
cKeyList m_keys;
int m_nIndex;
_bstr_t m_strGroup;
std::string m_strGroupKey;
RegKey m_key;
bool m_bOrderChanged;
// This member is purely for holdinga reference to the main decal object
// and keep this object from being orphaned
CComPtr< IDecal > m_pDecal;
// IDecalEnum
public:
STDMETHOD(MoveBefore)(REFCLSID clsidBefore);
STDMETHOD(get_Group)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_Property)(BSTR Name, /*[out, retval]*/ VARIANT *pVal);
STDMETHOD(get_ResourcePath)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_SurrogateClass)(/*[out, retval]*/ CLSID *pVal);
STDMETHOD(Next)();
STDMETHOD(CreateInstance)(REFIID iid, /*[out, retval, iid_is(iid)]*/ LPVOID *ppvItf);
STDMETHOD(get_Enabled)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(put_Enabled)(/*[in]*/ VARIANT_BOOL newVal);
STDMETHOD(get_ComClass)(/*[out, retval]*/ CLSID *pVal);
STDMETHOD(get_FriendlyName)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(Skip)(REFCLSID clsid);
};
#endif //__DECALENUM_H_