openDecal/NewNativeStubs/DHS/NOTES.md
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

31 lines
1.3 KiB
Markdown

# DHS.DLL (Decal Hotkey System)
## Origin
Factored out of the old **DecalInput.DLL** — the hotkey registration, detection,
and dispatch logic was extracted into its own COM server.
## Binary Facts
- Size: **139 KB**
- Type: COM in-process server (DLL)
- Standard 4 COM exports: `DllCanUnloadNow`, `DllGetClassObject`, `DllRegisterServer`, `DllUnregisterServer`
## What It Does
Manages hotkey bindings for Decal plugins — registering key combinations, detecting
when they are pressed, and firing events to the appropriate plugin. This was
previously part of DecalInput's responsibilities.
## Reconstruction Notes
- **COMPARE WITH:** The old source files:
- `Native/DecalInput/Hotkey.cpp`
- `Native/DecalInput/Hotkey.h`
The DHS module almost certainly started as a copy of that hotkey code, then was
expanded and wrapped in its own COM server.
- **LOOK AT:** `Managed/Decal.Interop.DHS/` for the COM interface definitions
this DLL must implement. That directory contains **13 decompiled C# files**.
- **Strategy:** Start by extracting the hotkey-related classes from the old
`DecalInput` source, then wrap them in the COM interfaces defined by the
interop assembly. The delta between old `Hotkey.cpp` and the new interop
interfaces will show what was added/changed.