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>
84 lines
1.7 KiB
C++
84 lines
1.7 KiB
C++
// ActiveXSurrogate.h : Declaration of the cActiveXSurrogate
|
|
|
|
#ifndef __ACTIVEXSURROGATE_H_
|
|
#define __ACTIVEXSURROGATE_H_
|
|
|
|
#include "resource.h" // main symbols
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// cActiveXSurrogate
|
|
class ATL_NO_VTABLE cActiveXSurrogate :
|
|
public CComObjectRootEx<CComMultiThreadModel>,
|
|
public CComCoClass<cActiveXSurrogate, &CLSID_ActiveXSurrogate>,
|
|
public IDecalFileSurrogate,
|
|
public IDecalUninstall
|
|
{
|
|
public:
|
|
cActiveXSurrogate()
|
|
{
|
|
}
|
|
|
|
DECLARE_REGISTRY_RESOURCEID(IDR_ACTIVEXSURROGATE)
|
|
|
|
DECLARE_PROTECT_FINAL_CONSTRUCT()
|
|
|
|
BEGIN_COM_MAP(cActiveXSurrogate)
|
|
COM_INTERFACE_ENTRY(IDecalFileSurrogate)
|
|
COM_INTERFACE_ENTRY(IDecalUninstall)
|
|
END_COM_MAP()
|
|
|
|
CComBSTR m_strFile;
|
|
CComBSTR m_strGroup;
|
|
CLSID m_clsid;
|
|
|
|
public:
|
|
// IDecalFileSurrogate
|
|
STDMETHOD(get_Extension)( BSTR *pVal )
|
|
{
|
|
if( pVal == NULL )
|
|
{
|
|
_ASSERT( FALSE );
|
|
return E_POINTER;
|
|
}
|
|
|
|
*pVal = T2BSTR( _T( "dll" ) );
|
|
return S_OK;
|
|
}
|
|
|
|
STDMETHOD(get_Description)( BSTR *pVal )
|
|
{
|
|
if( pVal == NULL )
|
|
{
|
|
_ASSERT( FALSE );
|
|
return E_POINTER;
|
|
}
|
|
|
|
*pVal = T2BSTR( _T( "ActiveX Plugin" ) );
|
|
return S_OK;
|
|
}
|
|
|
|
STDMETHOD(Register)(BSTR strFilename);
|
|
|
|
// IDecalUninstall
|
|
STDMETHOD(Prepare)( IDecalEnum *pEnum )
|
|
{
|
|
// Get the class
|
|
pEnum->get_ComClass( &m_clsid );
|
|
|
|
// Get the file
|
|
static _bstr_t _strFile( _T( "File" ) );
|
|
|
|
CComVariant vFile;
|
|
pEnum->get_Property( _strFile, &vFile );
|
|
m_strFile = vFile.bstrVal;
|
|
|
|
// Get the group
|
|
pEnum->get_Group( &m_strGroup );
|
|
|
|
return S_OK;
|
|
}
|
|
|
|
STDMETHOD(Uninstall)();
|
|
};
|
|
|
|
#endif //__ACTIVEXSURROGATE_H_
|