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>
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Decal.Interop.Net;
|
|
|
|
namespace Decal.DecalNet
|
|
{
|
|
[ComVisible(true)]
|
|
[ClassInterface(ClassInterfaceType.None)]
|
|
public class MessageImpl : IMessage2
|
|
{
|
|
private readonly byte[] _rawData;
|
|
private readonly int _type;
|
|
private readonly bool _outgoing;
|
|
|
|
public MessageImpl(byte[] rawData, bool outgoing)
|
|
{
|
|
_rawData = rawData ?? Array.Empty<byte>();
|
|
_outgoing = outgoing;
|
|
|
|
// Message type is the first DWORD in the raw data
|
|
if (_rawData.Length >= 4)
|
|
_type = BitConverter.ToInt32(_rawData, 0);
|
|
}
|
|
|
|
public int Type => _type;
|
|
|
|
public byte[] RawData => _rawData;
|
|
|
|
// Parameterized property - Value takes an index via IDispatch
|
|
public object Value => null;
|
|
|
|
// Parameterized property - Struct takes an index via IDispatch
|
|
public IMessageMember Struct => null;
|
|
|
|
// Parameterized property
|
|
public byte[] RawValue => _rawData;
|
|
|
|
// Parameterized property
|
|
public string FieldName => string.Empty;
|
|
|
|
public int Count => 0;
|
|
|
|
public MessageRoot Begin => null;
|
|
}
|
|
}
|