openDecal/Native/Inject/InjectService.h
erik d1442e3747 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>
2026-02-08 18:27:56 +01:00

52 lines
1.2 KiB
C++

// InjectService.h : Declaration of the cInjectService
#ifndef __INJECTSERVICE_H_
#define __INJECTSERVICE_H_
#include "resource.h" // main symbols
#include <DecalImpl.h>
/////////////////////////////////////////////////////////////////////////////
// cInjectService
class ATL_NO_VTABLE cInjectService :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<cInjectService, &CLSID_InjectService>,
public IInjectService,
public IDecalServiceImpl<cInjectService>,
public IDecalDirectory
{
public:
cInjectService()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_INJECTSERVICE)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(cInjectService)
COM_INTERFACE_ENTRY(IInjectService)
COM_INTERFACE_ENTRY(IDecalService)
COM_INTERFACE_ENTRY(IDecalDirectory)
END_COM_MAP()
// IDecalService
STDMETHOD(BeforePlugins)();
STDMETHOD(AfterPlugins)();
// IDecalDirectory
STDMETHOD(Lookup)(BSTR strName, IUnknown **ppvItf)
{
if ( ::wcsicmp ( strName, L"site" ) != 0 )
return E_INVALIDARG;
return get_Site ( reinterpret_cast< IPluginSite ** > ( ppvItf ) );
}
// IInjectService
public:
STDMETHOD(InitPlugin)(IUnknown *pUnk);
STDMETHOD(get_Site)(/*[out, retval]*/ IPluginSite **pVal);
};
#endif //__INJECTSERVICE_H_